@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;600;700;800&family=Noto+Serif+TC:wght@700;900&display=swap");
@import url("/css/tokens.css");

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 86% 7%, rgba(223,255,0,.22), transparent 26rem),
    var(--paper);
  font-family: "Noto Sans TC", sans-serif;
  line-height: 1.65;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }
.shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }

.site-nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(242,240,232,.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.nav-inner { height: 76px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; }
.brand-mark {
  width: 37px; aspect-ratio: 1; display: grid; place-items: center;
  flex: 0 0 37px; background: var(--ink) url("/assets/chidian-lightning.svg") center / cover no-repeat;
  color: transparent; font-size: 0; overflow: hidden; border-radius: 12px 4px 12px 4px;
  transform: rotate(-3deg);
}
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.nav-links a { text-decoration: none; font-weight: 600; font-size: .92rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border: 1px solid var(--ink);
  border-radius: 999px; background: transparent; text-decoration: none;
  color: var(--ink); font-weight: 800; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 4px 4px 0 var(--ink); }
.button.primary { background: var(--acid); }
.button.dark { background: var(--ink); color: white; }
.button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }

.hero {
  min-height: 620px; display: grid; grid-template-columns: 1.1fr .9fr;
  align-items: center; gap: clamp(36px, 7vw, 100px); padding-block: 72px;
}
.eyebrow {
  display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px;
  border: 1px solid var(--ink); border-radius: 999px; font-size: .78rem;
  font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.hero h1 {
  margin: 22px 0; max-width: 780px; font-family: "Noto Serif TC", serif;
  font-size: clamp(3rem, 6.9vw, 6.4rem); line-height: .99; letter-spacing: -.055em;
}
.hero h1 em { font-style: normal; background: linear-gradient(transparent 63%, var(--acid) 63%); }
.hero-slogan { margin: -8px 0 18px; font: 900 clamp(1.35rem, 2.5vw, 2rem)/1.25 "Noto Serif TC", serif; }
.hero-copy { max-width: 660px; font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); }
.hero-actions { margin-top: 30px; display: grid; justify-items: start; gap: 14px; }
.text-link { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; text-decoration: none; }
.text-link:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.scroll-arrow { display: grid; width: 24px; height: 24px; place-items: center; color: var(--orange); border: 1px solid var(--orange); border-radius: 50%; font-size: 1rem; line-height: 1; }
.microcopy { margin-top: 14px; color: var(--muted); font-size: .82rem; }

.rescue-card {
  position: relative; padding: 26px; border: 2px solid var(--ink);
  border-radius: 34px 10px 34px 10px; background: #fff; box-shadow: 14px 14px 0 var(--ink);
  transform: rotate(1.8deg);
}
.rescue-card::before {
  content: "創作者座標"; position: absolute; top: -16px; right: 24px;
  background: var(--orange); color: white; padding: 5px 12px; border: 2px solid var(--ink);
  font-size: .76rem; font-weight: 800; transform: rotate(3deg);
}
.profile-head { display: flex; align-items: center; gap: 16px; }
.avatar {
  width: 74px; height: 74px; border-radius: 50%; object-fit: cover;
  display: grid; place-items: center; background: var(--acid); border: 2px solid var(--ink);
  font: 900 1.5rem "Noto Serif TC", serif;
}
.profile-head h2 { margin: 0; font-size: 1.35rem; }
.profile-head p { margin: 2px 0 0; color: var(--muted); }
.status-strip { margin: 24px 0 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .76rem; font-weight: 700; }
.chip.good { background: rgba(223,255,0,.4); border-color: #91a600; }
.social-row {
  display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 14px;
  border: 1px solid var(--line); border-radius: 15px; text-decoration: none;
}
.social-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--ink); color: white; font-weight: 800; }
.social-icon svg { width: 17px; height: 17px; display: block; fill: none; stroke: currentColor; stroke-width: 1.9; }
.social-icon svg .instagram-dot { fill: currentColor; stroke: none; }
.social-icon.instagram { background: linear-gradient(135deg, #feda75 0%, #fa7e1e 34%, #d62976 67%, #4f5bd5 100%); }
.social-icon.youtube { background: #ff0000; }
.social-row strong { display: block; }
.social-row small { color: var(--muted); }
.social-row .arrow { margin-left: auto; }
.profile-share-note {
  display: grid;
  gap: 3px;
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 5px solid var(--orange);
  background: #fff4ef;
}
.profile-share-note strong { font-size: .9rem; }
.profile-share-note small { color: var(--muted); }

.statement { padding: 72px 0; border-block: 1px solid var(--line); background: var(--ink); color: white; }
.statement blockquote {
  margin: 0; max-width: 1000px; font: 900 clamp(2.2rem, 5vw, 5rem)/1.2 "Noto Serif TC", serif;
}
.statement blockquote span { color: var(--acid); }
.section { padding-block: 84px; }
#how { scroll-margin-top: 96px; }
.section-head { max-width: 700px; margin-bottom: 44px; }
.section h2 { margin: 14px 0; font: 900 clamp(2.2rem, 4.7vw, 4.4rem)/1.1 "Noto Serif TC", serif; letter-spacing: -.04em; }
.section-head h2 em { font-style: normal; background: linear-gradient(transparent 62%, var(--acid) 62%); }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
  min-height: 240px; padding: 26px; border: 1px solid var(--line);
  border-radius: 24px 6px 24px 6px; background: rgba(255,255,255,.52);
}
.feature:nth-child(2) { transform: translateY(24px); background: var(--acid); }
.feature-index { font: 900 3rem "Noto Serif TC", serif; opacity: .28; }
.feature h3 { margin: 28px 0 8px; font-size: 1.25rem; }
.feature p { margin: 0; color: #4e5049; }
.trust-section { padding-top: 0; }
.trust-card {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 6vw, 80px);
  padding: clamp(28px, 4.5vw, 48px);
  border: 2px solid var(--ink);
  border-radius: 34px 10px 34px 10px;
  background: var(--ink);
  color: white;
  box-shadow: 12px 12px 0 var(--acid);
}
.trust-card .eyebrow { border-color: rgba(255,255,255,.5); }
.trust-card h2 { margin: 20px 0 18px; }
.trust-card h2 em { color: var(--acid); font-style: normal; }
.trust-intro > p { max-width: 560px; color: rgba(255,255,255,.74); }
.trust-actions { display: grid; justify-items: start; gap: 12px; margin-top: 24px; }
.trust-link { margin-top: 0; color: white; }
.trust-link span { color: var(--acid); }
.trust-facts { display: grid; gap: 12px; align-content: start; }
.trust-fact {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 18px;
  background: rgba(255,255,255,.08);
}
.trust-fact-index { color: var(--acid); font: 900 1.25rem "Noto Serif TC", serif; }
.trust-fact h3 { margin: 0 0 4px; font-size: 1.1rem; }
.trust-fact p { margin: 0; color: rgba(255,255,255,.74); }
.trust-note { margin: 2px 2px 0; color: rgba(255,255,255,.64); font-size: .84rem; }
.trust-note strong { color: var(--acid); }
.waitlist { padding: 48px; border-radius: 40px 10px 40px 10px; background: var(--orange); color: white; display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; }
.waitlist h2 { margin: 0 0 10px; font-size: clamp(2rem,4vw,4rem); }
.waitlist p { margin: 0; max-width: 620px; }
.footer { padding: 54px 0 32px; }
.footer-grid { display: flex; align-items: start; gap: 30px; }
.footer-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--muted); font-size: .85rem; }
.footer-note { margin-top: 38px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }

.profile-page { min-height: 100vh; padding: 70px 0; }
.public-card { width: min(calc(100% - 32px), 660px); margin: auto; }
.public-card .rescue-card { transform: none; }
.public-actions { display: grid; gap: 10px; margin-top: 22px; }
.public-actions .social-row { background: white; }
.profile-bio { margin: 20px 0; white-space: pre-wrap; }
.loading, .empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.notice { padding: 14px 16px; border: 1px solid var(--line); background: rgba(223,255,0,.25); border-radius: 12px; font-size: .9rem; }

.dashboard { min-height: 100vh; padding-block: 60px; }
.auth-panel {
  min-height: calc(100vh - 196px);
  display: grid;
  grid-template-columns: 1fr minmax(360px, 500px);
  align-items: center;
  gap: clamp(36px, 8vw, 110px);
  padding-block: 48px;
}
.auth-intro h1 {
  max-width: 620px;
  margin: 20px 0 14px;
  font: 900 clamp(2.7rem, 5vw, 5.4rem)/1.05 "Noto Serif TC", serif;
  letter-spacing: -.045em;
}
.auth-intro > p { max-width: 560px; color: var(--muted); font-size: 1.08rem; }
.auth-promise {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.auth-promise > span:first-child {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--acid);
  border: 1px solid var(--ink);
  font-weight: 900;
}
.auth-promise strong, .auth-promise small { display: block; }
.auth-promise small { color: var(--muted); }
.auth-form-card {
  padding: clamp(24px, 4vw, 38px);
  border: 2px solid var(--ink);
  border-radius: 34px 10px 34px 10px;
  background: rgba(255,255,255,.88);
  box-shadow: 10px 10px 0 var(--ink);
}
.auth-form-card h2 { margin: 8px 0 6px; font-size: 1.65rem; }
.step-label {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.auth-form-card .form-actions, .auth-form-card .button { width: 100%; }
.auth-form-card #code-field .button { margin-top: 16px; }
.dashboard-grid { display: grid; grid-template-columns: 280px 1fr; gap: 32px; }
.dashboard-aside, .panel { border: 1px solid var(--line); background: rgba(255,255,255,.65); border-radius: 24px 7px 24px 7px; padding: 24px; }
.dashboard-aside { align-self: start; position: sticky; top: 100px; }
.dashboard-aside nav { display: grid; gap: 8px; margin-top: 28px; }
.dashboard-aside nav a { text-decoration: none; padding: 10px 12px; border-radius: 10px; }
.dashboard-aside nav a.active { background: var(--acid); font-weight: 800; }
.panel + .panel { margin-top: 18px; }
.panel h1, .panel h2 { margin-top: 0; }
.about-page { min-height: calc(100vh - 110px); }
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(32px, 7vw, 96px);
  align-items: start;
  margin-top: 58px;
}
.about-intro { position: sticky; top: 108px; }
.about-intro h1 {
  margin: 22px 0 0;
  font: 900 clamp(2.8rem, 5vw, 5.5rem)/1.04 "Noto Serif TC", serif;
  letter-spacing: -.055em;
}
.about-lede { max-width: 380px; margin: 26px 0 0; color: var(--muted); font-size: 1.1rem; }
.about-story {
  padding: clamp(28px, 5vw, 54px);
  border: 2px solid var(--ink);
  border-radius: 34px 10px 34px 10px;
  background: var(--ink);
  color: white;
  box-shadow: 12px 12px 0 var(--acid);
}
.about-story p { margin: 0; color: rgba(255,255,255,.78); font-size: 1.08rem; }
.about-story p + p { margin-top: 24px; }
.about-story .about-opening {
  color: white;
  font: 900 clamp(1.65rem, 3vw, 2.7rem)/1.25 "Noto Serif TC", serif;
  letter-spacing: -.035em;
}
.about-story .about-closing { color: rgba(255,255,255,.9); }
.about-story strong { color: var(--acid); }
.about-back { margin-top: 38px; }
.field { display: grid; gap: 6px; margin-top: 16px; }
.field label { font-size: .84rem; font-weight: 800; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: white; color: var(--ink);
}
.field textarea { min-height: 110px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; }
.hidden { display: none !important; }
.error { color: #9c1b00; font-weight: 700; }
.success { color: #426000; font-weight: 700; }
.visually-hidden { position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0 }
.profile-editor-grid { display:grid;grid-template-columns:minmax(0,1.45fr) minmax(240px,.55fr);gap:28px;align-items:start }
.avatar-editor { display:flex;align-items:center;gap:18px;margin:18px 0 24px }
.avatar-editor .avatar,.profile-live-preview .avatar { width:88px;height:88px;border-radius:28px;object-fit:cover;flex:0 0 auto }
.profile-live-preview { padding:26px;border-radius:24px;background:linear-gradient(145deg,#17191e,#282b32);color:#fff;position:sticky;top:24px }
.profile-live-preview h3 { margin:18px 0 4px;font-size:1.4rem }.profile-live-preview p{color:#d9dce3;overflow-wrap:anywhere}
.qr-panel { margin-top:18px;padding:20px;border-radius:20px;background:#fff;text-align:center;border:1px solid var(--line) }.qr-panel img{width:220px;max-width:100%}

@media (max-width: 820px) {
  .nav-links a:not(.button) { display: none; }
  .hero { grid-template-columns: 1fr; padding-block: 64px; }
  .rescue-card { max-width: 560px; }
  .feature-grid, .dashboard-grid, .auth-panel { grid-template-columns: 1fr; }
  .feature:nth-child(2) { transform: none; }
  .trust-card { grid-template-columns: 1fr; box-shadow: 7px 7px 0 var(--acid); }
  .waitlist { grid-template-columns: 1fr; padding: 36px 24px; }
  .dashboard-aside { position: static; }
  .auth-panel { align-items: start; padding-block: 34px 70px; }
  .auth-intro h1 { font-size: 3.2rem; }
  .profile-editor-grid { grid-template-columns: 1fr; }.profile-live-preview{position:static}
  .about-layout { grid-template-columns: 1fr; margin-top: 42px; }
  .about-intro { position: static; }
}
@media (max-width: 560px) {
  .shell { width: min(calc(100% - 24px), var(--max)); }
  .site-nav { overflow-x: clip; }
  .site-nav .nav-inner { width: 100vw; max-width: 100vw; margin-inline: 0; padding-inline: 12px; height: 66px; gap: 12px; }
  .brand span:last-child { display: none; }
  .nav-links { min-width: 0; gap: 0; }
  .nav-links .button { min-height: 44px; padding-inline: 12px; font-size: .78rem; }
  .hero h1 { font-size: 3.4rem; }
  .footer-grid, .form-row { display: grid; grid-template-columns: 1fr; }
  .footer-links { margin-left: 0; }
  .auth-intro h1 { font-size: 2.65rem; }
  .auth-form-card { box-shadow: 6px 6px 0 var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.incident-card {
  margin: 20px 0;
  padding: 20px;
  border: 2px solid var(--ink, #171717);
  border-left: 8px solid #ff5a36;
  border-radius: 16px;
  background: #fff4ef;
}
.incident-card h3 { margin: 6px 0 10px; }
.profile-trust-note {
  display: grid;
  gap: 4px;
  margin: 18px 0 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(223,255,0,.18);
}
.profile-trust-note strong { font-size: .95rem; }
.profile-trust-note span { color: var(--muted); font-size: .9rem; }
.subscription-form {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(20, 20, 20, .18);
}
.subscription-form h3 { margin-bottom: 6px; }
.subscription-manager { max-width: 680px; margin-inline: auto; }
.incident-list { margin-top: 22px; }
