:root {
  color-scheme: dark;
  --bg: #101418;
  --bg2: #171d23;
  --card: #1c2229;
  --line: #2a323b;
  --text: #e8e6e3;
  --muted: #98a0a8;
  --accent: #e5484d;
  --accent2: #4cc2b0;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Noto Sans TC", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

nav.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
  background: var(--bg2);
}
nav.top .brand { font-weight: 700; font-size: 1.1rem; letter-spacing: .03em; }
nav.top .links { display: flex; gap: 16px; align-items: center; }
nav.top .who { color: var(--muted); font-size: .9rem; }

main.wrap { max-width: 640px; margin: 0 auto; padding: 32px 20px 64px; }
main.wide { max-width: 960px; margin: 0 auto; padding: 32px 20px 64px; }

h1 { font-size: 1.5rem; margin-bottom: 6px; }
h2 { font-size: 1.15rem; margin-bottom: 12px; }
p.sub { color: var(--muted); margin-bottom: 24px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 20px; margin-bottom: 16px;
}

.btn {
  display: inline-block; border: none; cursor: pointer;
  background: var(--accent); color: #fff;
  font-size: 1rem; padding: 10px 22px; border-radius: 8px;
}
.btn:hover { filter: brightness(1.1); }
.btn.ghost {
  background: transparent; border: 1px solid var(--line); color: var(--text);
}
.btn.small { padding: 6px 14px; font-size: .9rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

label { display: block; margin: 14px 0 6px; color: var(--muted); font-size: .92rem; }
input[type=text], input[type=email], input[type=password], input[type=number], select {
  width: 100%; padding: 10px 12px; font-size: 1rem;
  background: var(--bg2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
}
input:focus, select:focus { outline: 1px solid var(--accent2); }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.choice {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; cursor: pointer; text-align: center;
}
.choice .t { font-size: 1rem; }
.choice .d { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.choice.sel { border-color: var(--accent2); background: #1a262b; }

.steps { display: flex; gap: 8px; margin-bottom: 20px; }
.steps .dot {
  flex: 1; height: 4px; border-radius: 2px; background: var(--line);
}
.steps .dot.on { background: var(--accent2); }

.row { display: flex; gap: 12px; margin-top: 22px; }
.row .btn { flex: 1; }
.err { color: var(--accent); margin-top: 12px; min-height: 1.2em; font-size: .92rem; }
.fine { color: var(--muted); font-size: .85rem; margin-top: 10px; }
.check { display:flex; gap:8px; align-items:center; color:var(--text); }
.check input[type="checkbox"] { width:auto; min-height:auto; }

/* discover 卡片牆 */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.pcard {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden;
}
.pcard .ph {
  height: 180px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #232b33, #1a2027);
  color: #3a4450; font-size: 2rem;
}
.pcard .info { padding: 12px 14px; }
.pcard .nm { font-weight: 600; }
.pcard .mt { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.pcard .tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: .75rem; color: var(--accent2);
  border: 1px solid #24413d; border-radius: 999px; padding: 2px 9px;
}
.empty {
  text-align: center; padding: 60px 20px; color: var(--muted);
}
.empty .big { font-size: 1.2rem; color: var(--text); margin-bottom: 8px; }
