:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #16202f;
  --muted: #6b7789;
  --line: #e2e7f0;
  --accent: #2f6df6;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --card: #151d2c;
    --text: #e8edf7;
    --muted: #8f9cb3;
    --line: #26303f;
    --accent: #5b8cff;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { background: var(--bg); }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  /* 讓內容避開 iPhone 的瀏海與底部橫條 */
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
  -webkit-font-smoothing: antialiased;
}

header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 20px 16px;
}

.logo {
  width: 46px; height: 46px;
  flex: 0 0 46px;
  border-radius: 13px;
  background: linear-gradient(140deg, #5b8cff, #2f6df6);
  color: #fff;
  font-weight: 700;
  font-size: 24px;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(47, 109, 246, .3);
}

h1 { font-size: 20px; margin: 0; letter-spacing: .02em; }
.sub { margin: 3px 0 0; font-size: 13px; color: var(--muted); }

main { padding: 0 16px 32px; max-width: 560px; margin: 0 auto; }

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

h2 { font-size: 15px; margin: 0 0 14px; letter-spacing: .02em; }

.hint { font-size: 13px; color: var(--muted); margin: 0 0 12px; line-height: 1.65; }

/* 檢查清單 */
.checks { list-style: none; margin: 0; padding: 0; }

.checks li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.checks li:last-child { border-bottom: 0; padding-bottom: 0; }

.dot {
  width: 9px; height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--muted);
}
li.ok  .dot { background: var(--ok); }
li.warn .dot { background: var(--warn); }
li.bad .dot { background: var(--bad); }

.label { flex: 1; color: var(--muted); }
.val { font-weight: 600; text-align: right; }
li.ok  .val { color: var(--ok); }
li.warn .val { color: var(--warn); }
li.bad .val { color: var(--bad); }

/* 計數器 */
.counter {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0 14px;
}
#count {
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(140deg, #5b8cff, #2f6df6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.unit { font-size: 14px; color: var(--muted); }

.btn {
  display: block;
  width: 100%;
  padding: 13px;
  border-radius: 11px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.btn:active { background: var(--line); }

.steps { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.9; color: var(--muted); }
.steps strong { color: var(--text); }

.info { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; margin: 0; font-size: 13px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; word-break: break-all; }

footer { text-align: center; font-size: 12px; color: var(--muted); padding: 8px 0; }
