:root {
  --bg: #0b1a33;
  --bg2: #0e3c6e;
  --ink: #090707;
  --cream: #f4efe6;
  --accent: #ea611d;
  --muted: #6b6b6b;
  --line: #d9d4c7;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 16px/1.6 -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg2), var(--bg));
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
}
main.page { max-width: 480px; margin: 0 auto; }
.site-head { display: flex; align-items: center; justify-content: space-between; color: #fff; margin-bottom: 16px; }
.site-head .brand { font-weight: 900; font-size: 20px; letter-spacing: .04em; color: #fff; text-decoration: none; }
.site-head .back { color: #ffd9c4; text-decoration: none; font-size: 14px; }
.card {
  background: var(--cream);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
h1 { font-size: 24px; margin: 0 0 8px; }
h2 { font-size: 18px; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 14px; }
.steps { display: flex; gap: 8px; margin: 12px 0 4px; padding: 0; list-style: none; }
.steps li { flex: 1; background: #fff; border-radius: 12px; padding: 8px 6px; text-align: center; font-size: 13px; }
.steps li b { display: block; color: var(--accent); font-size: 18px; }
.btn {
  display: block; width: 100%; padding: 14px 16px; border: 0; border-radius: 14px;
  background: var(--accent); color: #fff; font-size: 17px; font-weight: 800; text-align: center;
  text-decoration: none; cursor: pointer; margin-top: 10px;
}
.btn.light { background: #fff; color: var(--ink); border: 2px solid var(--line); }
.btn.ghost { background: transparent; color: #ffd9c4; border: 2px solid rgba(255, 255, 255, .35); }
.btn[disabled], .btn.disabled { background: #e8b9a3; color: #7a3a1c; cursor: default; pointer-events: none; }
.btn.light[disabled], .btn.light.disabled { background: #f0ece4; color: #9a9a9a; }
.row { display: flex; gap: 10px; }
.row .btn { flex: 1; }
label.field { display: block; margin: 14px 0 0; font-weight: 700; }
label.field span { display: block; font-size: 14px; color: var(--muted); font-weight: 400; }
input[type=text], select {
  width: 100%; padding: 12px 14px; font-size: 17px; border: 2px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); margin-top: 6px;
}
.avatar-wrap { display: flex; align-items: center; gap: 16px; }
.avatar-wrap img {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #ddd;
  border: 4px solid var(--accent); cursor: pointer;
}
.preview { width: 100%; border-radius: 12px; background: #fff; display: block; min-height: 120px; }
.seg { display: flex; background: #fff; border-radius: 12px; padding: 4px; margin: 10px 0; }
.seg button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 10px; font-weight: 700; color: var(--muted); }
.seg button[aria-pressed=true] { background: var(--accent); color: #fff; }
.notice { background: #fff6ee; border-left: 4px solid var(--accent); padding: 10px 12px; border-radius: 8px; font-size: 14px; margin: 12px 0; }
.toast {
  position: fixed; left: 50%; bottom: calc(32px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: rgba(0, 0, 0, .85); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px;
  opacity: 0; transition: .2s; pointer-events: none; z-index: 99; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%); }
[hidden] { display: none !important; }
.stat { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.stat b { font-size: 20px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; }
