:root {
  --bg: #f5f6fb;
  --panel: #ffffff;
  --line: #e4e7f0;
  --text: #1f2430;
  --muted: #687082;
  --primary: #5b5ce2;
  --accent: #efe9ff;
  --danger: #ef5b5b;
  --success: #2d9b63;
  --shadow: 0 14px 38px rgba(29, 34, 63, 0.08);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Pretendard, sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
.app-shell { max-width: 820px; margin: 0 auto; padding: 24px 16px 80px; }
.topbar, .card-head, .row, .action-row, .goal-row, .header-actions { display: flex; align-items: center; }
.topbar, .card-head { justify-content: space-between; gap: 12px; }
.topbar { margin-bottom: 20px; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; color: var(--primary); background: var(--accent); padding: 6px 10px; border-radius: 999px; }
.topbar h1 { margin: 8px 0 0; }
.ghost-btn, .icon-btn, .primary-btn, .secondary-btn, .danger-btn, select, input { font: inherit; }
.ghost-btn, .icon-btn, .primary-btn, .secondary-btn, .danger-btn { border: 0; border-radius: 14px; padding: 11px 14px; cursor: pointer; }
.ghost-btn { background: #fff; border: 1px solid var(--line); }
.icon-btn { background: #f1f3f9; }
.primary-btn { background: var(--primary); color: #fff; }
.primary-btn.compact { width: auto; }
.secondary-btn { background: #f1f3f9; }
.danger-btn { background: #ffe8e8; color: #9f2d2d; }
.timer-card, .summary-card { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.controls-row { gap: 12px; }
.field-block { flex: 1; }
.field-block label, .goal-row label { display: block; font-weight: 600; margin-bottom: 8px; }
select, input { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.timer-circle-wrap { display: grid; place-items: center; padding: 18px 0 12px; }
.timer-circle { width: 260px; height: 260px; border-radius: 50%; border: 10px solid #ececf5; display: grid; place-items: center; text-align: center; }
.timer-status { font-size: 14px; color: var(--muted); }
#timerDisplay { font-size: 44px; }
.today-total-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.today-total { background: #f6f7fc; border-radius: 18px; padding: 16px; }
.today-total.accent { background: #f0ebff; }
.today-total span, .today-total small { display: block; color: var(--muted); }
.today-total strong { display: block; margin-top: 8px; font-size: 24px; }
.action-row { gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.goal-row { gap: 12px; align-items: end; }
.goal-row label { flex: 1; }
.help-text { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.record-list, .live-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.record-item, .live-item { border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; justify-content: space-between; gap: 12px; }
.record-item span, .live-user-main span { color: var(--muted); font-size: 14px; display: block; margin-top: 6px; }
.live-user-side { text-align: right; }
.pill { display: inline-block; margin-bottom: 8px; font-size: 12px; padding: 5px 10px; border-radius: 999px; background: #eef1f7; color: var(--muted); }
.pill.running { background: #e9f8ef; color: var(--success); }
.pill.paused { background: #fff4df; color: #b27d17; }
.empty-message { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.log-box { background: #111827; color: #e5edf8; border-radius: 16px; padding: 14px; overflow: auto; white-space: pre-wrap; min-height: 90px; }
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; gap: 12px; padding: 14px 10px 18px; background: rgba(245,246,251,0.95); backdrop-filter: blur(12px); }
.bottom-nav a { background: #fff; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); }
.bottom-nav a.active { background: var(--primary); color: #fff; }
@media (max-width: 640px) {
  .today-total-grid { grid-template-columns: 1fr; }
  .goal-row { flex-direction: column; align-items: stretch; }
  .timer-circle { width: 220px; height: 220px; }
  #timerDisplay { font-size: 36px; }
}
