:root {
  --bg: #0b0f17;
  --surface: #141b27;
  --surface-2: #1c2533;
  --border: #2a3547;
  --text: #e6edf6;
  --muted: #8a98ac;
  --accent: #4c8dff;
  --accent-press: #3a7bea;
  --done: #3ecf8e;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
a { color: var(--accent); }

/* 通用按钮/输入：≥44px 触控，16px 字号防 iOS 聚焦缩放 */
input, button {
  font-size: 16px; font-family: inherit;
  border-radius: 12px; border: 1px solid var(--border);
  padding: 13px 14px; min-height: 48px;
}
input {
  width: 100%; background: var(--surface-2); color: var(--text);
}
input::placeholder { color: var(--muted); }
input:focus { outline: none; border-color: var(--accent); }
button {
  background: var(--accent); color: #fff; border-color: transparent;
  font-weight: 600; cursor: pointer;
}
button:active { background: var(--accent-press); }

/* 登录页 */
.login-wrap {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px; padding: 24px;
}
.brand { text-align: center; }
.brand h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: .5px; }
.brand p { margin: 0; color: var(--muted); font-size: 14px; }
.card {
  width: 100%; max-width: 360px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 18px;
  padding: 22px; display: flex; flex-direction: column; gap: 12px;
}

/* 待办房间 */
.topbar {
  position: sticky; top: 0; z-index: 5; background: var(--bg);
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.topbar h2 { margin: 0; font-size: 18px; flex: 1; }
.topbar .role { color: var(--muted); font-size: 12px; font-weight: 500; }
.logout-btn {
  min-height: 38px; padding: 7px 12px; font-size: 13px; font-weight: 500;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.container { max-width: 640px; margin: 0 auto; padding: 16px; }
.add-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.add-bar input { flex: 1; }
.add-bar button { flex: 0 0 auto; padding: 0 18px; }
.todo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.todo-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 4px 14px 4px 4px;
}
.check-btn {
  min-height: 44px; min-width: 44px; padding: 0; font-size: 22px;
  background: transparent; border: none; line-height: 1;
}
.todo-text { flex: 1; padding: 8px 0; }
.todo-item.is-done .todo-text { color: var(--muted); text-decoration: line-through; }
.sec { font-weight: 700; color: var(--text); }
.sec-2 { font-size: 17px; margin: 18px 0 4px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.sec-3 { font-size: 14px; color: var(--muted); margin: 12px 0 2px; }
.note { font-size: 13px; color: var(--muted); font-style: italic; padding: 2px 0 2px 4px; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }
