:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --fg: #0a0a0a;
  --muted: #6b6b6b;
  --line: #e4e4e4;
  --accent: #15803d;
  --accent-ink: #15803d;
  --danger: #dc2626;
  --ok: #15803d;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Noto Sans TC', system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --surface: #111111;
    --fg: #ededed;
    --muted: #8a8a8a;
    --line: #262626;
    --accent: #4ade80;
    --accent-ink: #4ade80;
    --danger: #f87171;
    --ok: #4ade80;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-attachment: fixed;
  min-height: 100vh;
}
body::before { /* 網格只在邊緣淡淡出現 */
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, var(--bg) 40%, transparent 100%);
}
a { color: inherit; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.latin { font-family: var(--mono); font-size: .9em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- nav ---- */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 12px; }
.brand { font: 700 18px var(--mono); text-decoration: none; letter-spacing: -0.02em; }
.cursor { animation: blink 1s steps(1) infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }
.nav-links { display: flex; gap: 20px; }
.nav-links a { font: 14px var(--mono); text-decoration: none; color: var(--muted); white-space: nowrap; padding: 4px 0; border-bottom: 1px solid transparent; }
.nav-links a:hover { color: var(--fg); }
.nav-links a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }

/* ---- type ---- */
.eyebrow { display: flex; align-items: center; gap: 8px; font: 13px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 12px; }
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.display { font-weight: 900; line-height: 1.08; letter-spacing: -0.03em; margin: 0; }
.display .accent { color: var(--accent); display: block; }
.page-title { font-size: clamp(36px, 6vw, 56px); margin-bottom: 12px; }
.page-lead { font-size: 17px; color: var(--muted); margin: 0; max-width: 620px; }
h2 { font-size: 24px; line-height: 1.3; letter-spacing: -0.02em; margin: 0 0 4px; }
h3 { font-size: 17px; line-height: 1.4; margin: 0; }

/* ---- blocks ---- */
.page-head { padding: 72px 0 40px; }
.section { padding: 40px 0 48px; border-top: 1px solid var(--line); }
.section-head { margin-bottom: 24px; }
.section-head p { margin: 0; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); }

/* ---- 首頁 ---- */
.hero { padding: 80px 0 56px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: end; }
.hero .display { font-size: clamp(52px, 9vw, 96px); }
.tagline { text-wrap: pretty; font-size: 18px; color: var(--muted); margin: 24px 0 32px; max-width: 480px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: var(--surface); }
.facts div { padding: 14px 16px; border-right: 1px solid var(--line); }
.facts div:last-child { border-right: 0; }
.facts b { display: block; font-weight: 500; }
.facts span { font: 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.next { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.next-label { font: 12px var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: .1em; }
.next-label::before { content: '// '; }
.next-date { font: 700 36px/1.1 var(--mono); }
.next-date small { font: 400 14px var(--mono); color: var(--muted); margin-left: 10px; }
.countdown { font: 500 14px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.next h3 { font: 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.next-talks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.next-talks li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-weight: 500; }
.next-talks li span { font: 400 13px var(--mono); color: var(--muted); }
.place { padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.place b { display: block; }

.go-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: var(--surface); }
.go { padding: 24px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; border: 0; border-right: 1px solid var(--line); background: transparent; transition: background .15s; }
.go:last-child { border-right: 0; }
.go:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.go .num { font: 13px var(--mono); color: var(--accent); }
.go p { margin: 0; color: var(--muted); font-size: 14px; }
.go .arrow { margin-top: auto; padding-top: 8px; font: 13px var(--mono); }

/* ---- buttons / links ---- */
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 1px solid var(--fg); background: transparent; color: var(--fg); font: 500 14px var(--mono); text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.btn:hover { background: var(--fg); color: var(--bg); }
.btn.primary { background: var(--fg); color: var(--bg); }
.btn.primary:hover { background: transparent; color: var(--fg); }
.btn:disabled { opacity: .5; cursor: wait; }
.link { font: 13px var(--mono); color: var(--accent); text-underline-offset: 3px; }

/* ---- 議程 ---- */
.sessions { list-style: none; margin: 0; padding: 0; }
.session { display: grid; grid-template-columns: 150px 1fr; }
.session-date { padding: 18px; border-right: 1px solid var(--line); font-family: var(--mono); }
.session-date b { display: block; font-size: 24px; }
.session-date small { color: var(--muted); font-size: 12px; }
.badge { display: inline-block; margin-top: 6px; font: 11px var(--mono); color: var(--accent); border: 1px solid var(--accent); padding: 0 6px; }
.session-talks { padding: 8px 18px; }
.talk { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.talk:last-child { border-bottom: 0; }
.talk-title { font-weight: 700; }
.talk-meta { font: 13px var(--mono); color: var(--muted); }
.talk-desc { margin: 4px 0 0; font-size: 14px; color: var(--muted); white-space: pre-wrap; }
.slot-open { padding: 10px 0; font: 13px var(--mono); color: var(--muted); }

/* ---- 表單 ---- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 24px; }
.form label { display: flex; flex-direction: column; gap: 6px; }
.form label > span { font: 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.form em { color: var(--accent); font-style: normal; }
.full { grid-column: 1 / -1; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: 15px var(--sans); border-radius: 0; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }
input[aria-invalid="true"] { border-color: var(--danger); }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.form-msg { margin: 0; font: 14px var(--mono); min-height: 1.5em; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--danger); }

/* ---- 精華 ---- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag { font: 13px var(--mono); padding: 4px 12px; min-height: 32px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.tag[aria-pressed="true"] { border-color: var(--fg); color: var(--fg); }
.hl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.hl { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.hl-meta { font: 12px var(--mono); color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.hl-meta b { font-weight: 400; }
.hl p { margin: 0; font-size: 14px; color: var(--muted); }
.hl-how-title { font: 12px var(--mono); color: var(--accent); margin-bottom: -6px; }
.hl-how-title::before { content: '// '; }
.hl-how { margin: 0; padding: 12px 12px 12px 32px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; }
.hl-links { display: flex; flex-wrap: wrap; gap: 12px; }
.hl-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; font: 11px var(--mono); color: var(--muted); }

/* ---- 關於 ---- */
.pillars { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); background: var(--surface); }
.pillar { display: grid; grid-template-columns: 44px 1fr; padding: 20px; border-bottom: 1px solid var(--line); }
.pillar:nth-child(odd) { border-right: 1px solid var(--line); }
.pillar:nth-last-child(-n+2) { border-bottom: 0; }
.pillar .num { font: 13px var(--mono); color: var(--accent); padding-top: 3px; }
.pillar p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.join { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.join a { padding: 20px; text-decoration: none; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s; }
.join a:hover { border-color: var(--accent); }
.join span { color: var(--muted); font-size: 13px; }
.venue { display: grid; grid-template-columns: 1fr 1.3fr; }
.venue-info { padding: 24px; display: flex; flex-direction: column; gap: 12px; border-right: 1px solid var(--line); }
.venue-info address { font-style: normal; }
.venue iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 32px 16px 48px; border-top: 1px solid var(--line); font: 13px var(--mono); color: var(--muted); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 56px; }
  .go-grid { grid-template-columns: 1fr; }
  .go { border-right: 0; border-bottom: 1px solid var(--line); }
  .go:last-child { border-bottom: 0; }
  .pillars { grid-template-columns: 1fr; }
  .pillar:nth-child(odd) { border-right: 0; }
  .pillar:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .venue { grid-template-columns: 1fr; }
  .venue-info { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 13px; }
  .page-head { padding: 48px 0 28px; }
  .facts b { font-size: 14px; }
  .form { grid-template-columns: 1fr; padding: 16px; }
  .session { grid-template-columns: 1fr; }
  .session-date { border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
  .badge { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
}

/* ---- 首頁：關於段落 ---- */
.intro-title { font-size: clamp(26px, 4vw, 36px); font-weight: 900; line-height: 1.25; margin-bottom: 8px; }
.intro-title .accent { color: var(--accent); }
.go-grid { grid-template-columns: repeat(2, 1fr); }

/* ---- 議程：圖片連結 ---- */
.talk-img { display: block; max-width: 100%; max-height: 320px; margin: 8px 0 4px; border: 1px solid var(--line); object-fit: contain; background: var(--bg); }
.link-preview .talk-img { max-height: 160px; }

/* ---- 投稿：步驟卡 ---- */
.stepper { padding: 24px; overflow: hidden; }
.step-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.step-count { font: 500 13px var(--mono); color: var(--accent); min-width: 64px; }
.dots { display: flex; gap: 6px; flex: 1; }
.dots i { height: 3px; flex: 1; max-width: 48px; background: var(--line); transition: background .35s; }
.dots i.on { background: var(--accent); }
.swipe-hint { font: 12px var(--mono); color: var(--muted); }
.viewport { overflow: hidden; transition: height .35s cubic-bezier(.2, .8, .2, 1); touch-action: pan-y; cursor: grab; }
.track { display: flex; align-items: flex-start; transition: transform .45s cubic-bezier(.2, .8, .2, 1); will-change: transform; }
.track.dragging { transition: none; cursor: grabbing; user-select: none; }
.step { flex: 0 0 100%; min-width: 0; margin: 0; padding: 4px 2px 8px; border: 0; display: flex; flex-direction: column; gap: 16px; opacity: .25; transform: scale(.96); transition: opacity .45s, transform .45s cubic-bezier(.2, .8, .2, 1); }
.step.active { opacity: 1; transform: none; }
.step legend { font-size: clamp(24px, 4vw, 32px); font-weight: 900; letter-spacing: -0.02em; padding: 0; margin-bottom: 4px; float: left; width: 100%; }
.step legend + * { clear: both; }
.step label { display: flex; flex-direction: column; gap: 6px; }
.step label > span, .field-label { font: 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.field-label small { text-transform: none; letter-spacing: 0; opacity: .8; margin-left: 6px; }
.step em { color: var(--accent); font-style: normal; }
.hint { margin: -6px 0 0; font-size: 13px; color: var(--muted); }
.step-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.stepper .form-msg { margin-top: 12px; }


.step-done { align-items: center; text-align: center; padding: 24px 8px 16px; }
.step-done p { margin: 0; color: var(--muted); }
.check { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; color: var(--bg); background: var(--accent); transform: scale(0); }
.step-done.active .check { animation: pop .5s .15s cubic-bezier(.2, 1.4, .4, 1) forwards; }

@keyframes pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.shake { animation: shake .35s; }

/* 進場：區塊捲進畫面時浮上來 */
@media (prefers-reduced-motion: no-preference) {
  .hero > *, .page-head { animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; }
  .hero > :nth-child(2) { animation-delay: .12s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .stepper { padding: 16px; }
  .swipe-hint { display: none; }
  .go-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .track, .step, .viewport, .dots i { transition: none; }
  .step-done.active .check { animation: none; transform: none; }
  .shake, }
input:focus-visible, textarea:focus-visible { outline-offset: -2px; }

/* ---- 議程：議題卡（一個主題一張，左右滑） ---- */
.deck { position: relative; }
.deck-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 0; padding: 4px 2px 8px; scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab; }
.deck-track::-webkit-scrollbar { display: none; }
.deck-track.dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.deck-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.talk-card { flex: 0 0 min(560px, 86%); scroll-snap-align: start; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; opacity: .55; transform: scale(.97); transform-origin: left center; transition: opacity .35s, transform .35s cubic-bezier(.2, .8, .2, 1), border-color .35s; }
.talk-card.active { opacity: 1; transform: none; border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.tc-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    radial-gradient(120% 90% at 85% 15%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 60%),
    var(--bg); }
.tc-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tc-num { position: absolute; left: 18px; bottom: 6px; font: 700 clamp(64px, 12vw, 112px)/1 var(--mono); color: var(--accent); letter-spacing: -.04em; }
.tc-cover.has-img .tc-num { font-size: 15px; bottom: auto; top: 12px; left: 12px; padding: 4px 8px; background: var(--bg); color: var(--fg); border: 1px solid var(--line); letter-spacing: 0; }
.tc-body { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px 24px; flex: 1; }
.tc-index { font: 500 12px var(--mono); letter-spacing: .08em; color: var(--accent-ink); }
.tc-title { margin: 0; font-size: clamp(22px, 3vw, 28px); font-weight: 900; line-height: 1.3; }
.tc-speaker { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.tc-avatar { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--accent); color: var(--accent); font: 700 14px var(--sans); border-radius: 50%; }
.tc-desc { margin: 0; color: var(--muted); white-space: pre-wrap; line-height: 1.7; }
.tc-link { margin-top: auto; align-self: flex-start; font: 500 14px var(--mono); color: var(--accent-ink); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.tc-cta { justify-content: center; align-items: flex-start; gap: 12px; padding: 32px 28px; min-height: 260px; border-style: dashed; }
.tc-cta:hover { border-color: var(--accent); }
.tc-plus { font: 300 56px/1 var(--mono); color: var(--accent); }
.deck-nav { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.deck-count { font: 500 13px var(--mono); min-width: 7ch; }
.deck-dots { display: flex; gap: 6px; flex: 1; }
.deck-dots i { width: 18px; height: 3px; background: var(--line); cursor: pointer; transition: background .25s, width .25s; }
.deck-dots i.on { width: 32px; background: var(--accent); }
.deck-btn { width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 16px var(--mono); cursor: pointer; }
.deck-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.deck-btn:disabled { opacity: .35; cursor: default; }
@media (max-width: 640px) {
  .talk-card { flex-basis: 88%; }
  .tc-body { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .talk-card { transition: none; transform: none; }
}

/* ---- 首頁：怎麼參加（兩條路） ---- */
.accent-ink { color: var(--accent); font-weight: 700; }
.paths { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; }
.path { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.path-speaker { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.path-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.path-tag { font: 700 20px var(--sans); }
.price { display: flex; align-items: baseline; gap: 4px; font-family: var(--mono); }
.price b { font-size: 28px; line-height: 1; }
.price small { font-size: 12px; color: var(--muted); }
.path-speaker .price b { color: var(--accent); }
.path-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.path-steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; }
.path-steps li::before { content: counter(s, decimal-leading-zero); grid-row: span 2; font: 700 14px var(--mono); color: var(--accent); padding-top: 2px; }
.path-steps b { font-weight: 700; }
.path-steps span { font-size: 14px; color: var(--muted); }
.path-actions { margin-top: auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.free-note { margin: 6px 0 0; font: 500 14px var(--mono); color: var(--accent); }
@media (max-width: 760px) { .paths { grid-template-columns: 1fr; } }

/* ---- 首頁：現場照片 ---- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.photo { margin: 0; background: var(--surface); border: 1px solid var(--line); }
.photo a { display: block; overflow: hidden; }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.photo a:hover img { transform: scale(1.03); }
.photo figcaption { display: flex; gap: 12px; align-items: baseline; padding: 12px 16px; font-size: 14px; }
.photo figcaption b { font: 700 13px var(--mono); color: var(--accent); white-space: nowrap; }
.photo figcaption span { color: var(--muted); }
@media (max-width: 640px) {
  .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .gallery::-webkit-scrollbar { display: none; }
  .photo { flex: 0 0 86%; scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) { .photo img { transition: none; } }
