/* Flowlog PC 앱(/app/) 공통·휴대폰 화면. 넓은 화면 배치는 app-pc.css. */
:root {
  color-scheme: light;
  --bg: #f6f6f8;
  --card: #ffffff;
  --ink: #10182c;
  --muted: #697386;
  --faint: #a3a8b6;
  --line: #e8e8ee;
  --purple: #5140d8;
  --purple-deep: #2f238f;
  --purple-soft: #ede9ff;
  --purple-softer: #f3f1fe;
  --fire: #ff7a2f;
  --fire-soft: #ffe8d8;
  --fire-surface: #fff5ee;
  --danger: #e5484d;
  --danger-soft: #fdecee;
  --goal: #f5c842;
  --radius-lg: 28px;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(16, 24, 44, 0.08);
  --shadow-sm: 0 2px 8px rgba(16, 24, 44, 0.06);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: 0.45; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }

.ms {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
  user-select: none;
}
.accent { color: #8b7fe6; }

/* ── 미리보기 띠 ─────────────────────────────── */
.app-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--purple-softer);
  color: var(--purple-deep);
  font-size: 13px;
  text-align: center;
}
.app-note .ms { font-size: 18px; }

/* ── 상단 ─────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(246, 246, 248, 0.88);
  backdrop-filter: blur(14px);
}
.topbar-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px 24px 14px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.01em; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e9f7ee;
  color: #23784a;
  font-size: 13px;
  font-weight: 600;
}
.sync-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #2fb36a; box-shadow: 0 0 0 3px rgba(47, 179, 106, 0.2); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.round-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid #e0dcfb;
  background: var(--purple-soft);
  color: var(--purple);
  display: grid; place-items: center;
  transition: transform 0.12s, background 0.12s;
}
.round-btn:hover { background: #e2dcff; }
.round-btn:active { transform: scale(0.94); }
.avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 3px solid var(--purple-soft);
  background: radial-gradient(circle at 35% 30%, #4a4a58, #111 70%);
}

/* ── 배치 ─────────────────────────────────────── */
.layout { padding: 4px 16px 110px; }
.col { min-width: 0; display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }

.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .section-head h2 { margin: 0; font-size: 21px; font-weight: 800; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding: 0 4px; }
.section-head h2.soft { color: #5d6474; font-size: 18px; font-weight: 700; }
.hint { color: var(--faint); font-size: 12px; }

/* ── 진행 중 타이머 ───────────────────────────── */
.timer-card { padding: 26px 28px 28px; transition: background 0.25s; }
.timer-card.focus { background: var(--fire-surface); box-shadow: 0 10px 30px rgba(255, 122, 47, 0.18); }
.timer-top { display: flex; align-items: center; gap: 12px; }
.cat-dot {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
}
.timer-top .title { font-size: 20px; font-weight: 800; }
.timer-top .cat-name { color: var(--muted); font-size: 13px; }
.everywhere { margin-left: auto; color: #23784a; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.everywhere .ms { font-size: 16px; }
.timer-mid { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 16px; }
.elapsed { font-size: 46px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stop-btn {
  width: 68px; height: 68px; border-radius: 50%; border: 0;
  background: var(--purple); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 18px rgba(81, 64, 216, 0.35);
  transition: transform 0.12s;
}
.stop-btn:hover { background: #4433c9; }
.stop-btn:active { transform: scale(0.93); }
.stop-btn .ms { font-size: 34px; }
.focus .stop-btn { background: var(--fire); box-shadow: 0 8px 18px rgba(255, 122, 47, 0.35); }
.goal-bar { height: 8px; border-radius: 99px; background: #f1f1f5; overflow: hidden; }
.goal-bar i { display: block; height: 100%; border-radius: inherit; background: var(--goal); transition: width 0.5s; }
.goal-label { display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 14px; }
.chip {
  border: 0; border-radius: 14px;
  padding: 9px 16px;
  background: var(--purple-soft); color: var(--purple-deep);
  font-weight: 700; font-size: 14px;
  transition: background 0.12s;
}
.chip:hover { background: #e0d9ff; }
.chip.on { background: var(--purple); color: #fff; }
.title-row { display: flex; gap: 10px; }
.title-input {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line); border-radius: 18px;
  padding: 0 14px;
}
.title-input .ms { color: #a59bf0; font-size: 20px; }
.title-input input { border: 0; outline: 0; flex: 1; min-width: 0; padding: 13px 0; font: inherit; font-size: 15px; background: transparent; }
.primary-btn {
  border: 0; border-radius: 18px;
  padding: 0 22px;
  background: var(--purple); color: #fff; font-weight: 800;
}
.primary-btn:hover { background: #4433c9; }
.focus-btn {
  width: 100%; margin-top: 12px;
  border: 1.5px solid #bdb4f3; border-radius: 18px;
  background: #fff; color: var(--purple);
  padding: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.focus-btn:hover { background: var(--purple-softer); }
.focus .focus-btn { border-color: #ffb88c; color: #d65a12; background: var(--fire-soft); }
.idle { text-align: center; padding: 18px 4px 6px; }
.idle .ms { font-size: 40px; color: #c6c1ef; }
.idle h3 { margin: 10px 0 4px; font-size: 20px; }
.idle p { margin: 0; color: var(--muted); font-size: 14px; }

/* ── 활동 시작 ───────────────────────────────── */
.grid-card { padding: 18px; }
.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cat-btn {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  border: 1px solid #ececf2; border-radius: var(--radius);
  background: #fff;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  font-size: 18px; font-weight: 800;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.cat-btn:hover { box-shadow: 0 8px 18px rgba(16, 24, 44, 0.1); transform: translateY(-1px); }
.cat-btn:active { transform: scale(0.97); }
.cat-btn.running { border-color: var(--purple); box-shadow: 0 0 0 2px var(--purple-soft); }
.cat-btn .cat-dot { width: 48px; height: 48px; }
.cat-btn kbd {
  position: absolute; top: 8px; right: 10px;
  font: 600 11px ui-monospace, monospace; color: var(--faint);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px;
}

.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.quick-btn {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid #ececf2; border-radius: var(--radius);
  background: #fff; padding: 16px;
  box-shadow: var(--shadow-sm);
  text-align: left;
}
.quick-btn:hover { box-shadow: 0 8px 18px rgba(16, 24, 44, 0.1); }
.quick-btn .cat-dot { width: 52px; height: 52px; }
.quick-btn b { display: block; font-size: 18px; }
.quick-btn small { display: block; margin-top: 4px; color: var(--purple); font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.quick-btn.active { border-color: var(--purple); }
.quick-btn.active small { color: var(--fire); }

/* ── 타임테이블 ──────────────────────────────── */
.soft-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: 16px; padding: 10px 14px;
  background: var(--purple-softer); color: var(--purple-deep); font-weight: 700;
}
.soft-btn .ms { font-size: 19px; }
.soft-btn:hover { background: var(--purple-soft); }
.timetable { position: relative; margin-top: 20px; }
.tt-track {
  position: relative;
  height: 30px;
  background-image: repeating-linear-gradient(90deg, #eceef3 0 7px, transparent 7px 11px);
  background-size: 100% 70%;
  background-position: center;
  background-repeat: no-repeat;
}
.tt-seg {
  position: absolute; top: 0; height: 100%;
  border-radius: 9px;
  min-width: 5px;
  border: 2px solid #fff;
  cursor: pointer;
  transition: filter 0.12s, transform 0.12s;
}
.tt-seg:hover { filter: brightness(1.08); transform: scaleY(1.12); }
.tt-seg.running { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.28) 0 6px, transparent 6px 12px); animation: slide 1.6s linear infinite; background-size: 34px 34px; }
@keyframes slide { to { background-position: 34px 0; } }
.tt-seg.plan { background: #b8bcc6; opacity: 0.75; border-style: solid; }
.tt-now { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 2px dashed #8f84ee; }
.tt-now::before { content: ""; position: absolute; top: -5px; left: -6px; width: 10px; height: 10px; border-radius: 50%; background: #8f84ee; }
.tt-tooltip {
  position: absolute; bottom: calc(100% + 10px);
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--purple-soft); color: var(--purple-deep);
  padding: 7px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 700;
  pointer-events: none;
}
.tt-axis { display: flex; justify-content: space-between; margin-top: 12px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 16px; color: #4c5263; font-size: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; }
.routine-chip { margin-top: 14px; }
.routine-chip button {
  border: 1.5px solid #b9bec9; border-radius: 16px;
  padding: 10px 16px; background: #f1f2f5; font-weight: 700; font-size: 14px;
}
.routine-chip button:hover { background: #e8eaef; }
.recommend {
  width: 100%; margin-top: 14px;
  display: flex; align-items: center; gap: 14px;
  border: 0; border-radius: 22px;
  background: var(--purple-softer);
  padding: 18px 20px; text-align: left;
}
.recommend:hover { background: var(--purple-soft); }
.recommend > .ms:first-child { color: var(--purple); }
.recommend-text { flex: 1; }
.recommend-text small { display: block; color: var(--muted); font-size: 13px; }
.recommend-text b { font-size: 18px; }

/* ── 최근 기록 ───────────────────────────────── */
.pill-btn {
  border: 0; border-radius: 999px; padding: 10px 18px;
  background: var(--purple-soft); color: var(--purple-deep); font-weight: 800; font-size: 14px;
}
.records-card { padding: 8px 22px; }
.records { list-style: none; margin: 0; padding: 0; }
.record { display: flex; align-items: center; gap: 16px; padding: 16px 0; }
.record + .record { border-top: 1px solid var(--line); }
.record .sq {
  width: 50px; height: 50px; border-radius: 15px; flex: none;
  display: grid; place-items: center; color: #fff;
}
.record .body { flex: 1; min-width: 0; cursor: pointer; }
.record .body b { display: block; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record .body span { display: block; color: #5d6474; font-size: 14px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.record .body small { color: var(--faint); font-size: 13px; }
.record .body:hover b { color: var(--purple); }
.icon-btn {
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: #b4b8c4;
  display: grid; place-items: center; flex: none;
}
.icon-btn:hover { background: #f3f3f6; }
.icon-btn.star.on { color: #f5b301; }
.icon-btn.del { background: var(--danger-soft); color: var(--danger); }
.icon-btn.del:hover { background: #fadadd; }
.icon-btn .ms { font-variation-settings: "FILL" 0, "wght" 500; }
.icon-btn.star.on .ms, .icon-btn.del .ms { font-variation-settings: "FILL" 1, "wght" 500; }
.empty { color: var(--faint); text-align: center; padding: 26px 0; font-size: 14px; }
.wide-soft-btn {
  width: 100%; border: 0; border-radius: 22px;
  padding: 16px; background: var(--purple-softer); color: var(--purple-deep);
  font-weight: 800;
}
.wide-soft-btn:hover { background: var(--purple-soft); }
.wide-soft-btn.inner { margin-top: 6px; }
.wide-soft-btn[hidden] { display: none; }

/* ── 통계 ─────────────────────────────────────── */
.sub { display: flex; align-items: center; gap: 10px; margin: 6px 0 8px; font-size: 18px; font-weight: 800; }
.sub-row { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; }
.legend-mini { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.legend-mini i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend-mini i.y { background: #c9ccd4; }
.legend-mini i.t { background: var(--purple); margin-left: 6px; }
.stat-list, .compare-list { list-style: none; margin: 0; padding: 0; }
.stat { display: grid; grid-template-columns: 50px 64px 1fr 92px; align-items: center; gap: 12px; padding: 12px 0; }
.stat + .stat { border-top: 1px solid var(--line); }
.stat .cat-dot { width: 46px; height: 46px; }
.stat .name { color: #4c5263; font-weight: 600; }
.bar { height: 12px; border-radius: 99px; background: #ebebef; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; transition: width 0.5s; }
.stat .val { text-align: right; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.cmp { display: grid; grid-template-columns: 64px 1fr 104px; align-items: center; gap: 12px; padding: 9px 0; }
.cmp .name { color: #4c5263; font-weight: 600; }
.cmp .bars { display: grid; gap: 4px; }
.cmp .bar { height: 8px; }
.cmp .bar.y i { background: #c9ccd4; }
.cmp .bar.t i { background: var(--purple); }
.cmp .diff { white-space: nowrap; text-align: right; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.diff.up { color: #23784a; }
.diff.down { color: #c2410c; }

/* ── Todo ─────────────────────────────────────── */
.todo-head { display: flex; align-items: center; justify-content: space-between; }
.todo-title { margin: 0; font-size: 34px; font-weight: 800; }
.outline-btn {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1.5px solid #dcdbe6; border-radius: 999px;
  background: #fff; padding: 10px 18px; font-weight: 800; font-size: 16px;
}
.outline-btn:hover { background: var(--purple-softer); }
.outline-btn.small { padding: 7px 14px; font-size: 14px; color: var(--purple); }
.outline-btn .ms { font-size: 20px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tab {
  border: 0; border-radius: 999px; background: transparent;
  padding: 11px 16px; color: #4c5263; font-size: 15px; white-space: nowrap;
}
.tab:hover { background: #ececf2; }
.tab.active { background: var(--purple); color: #fff; font-weight: 800; }
.cues-head { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.cues-title { margin: 0 auto 0 0; color: var(--purple); font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.cues-title .ms { color: #a59bf0; font-size: 20px; font-variation-settings: "FILL" 0; }
.text-btn {
  border: 0; background: transparent; color: var(--purple);
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 8px; font-weight: 700; border-radius: 10px;
}
.text-btn:hover { background: var(--purple-softer); }
.text-btn .ms { font-size: 18px; font-variation-settings: "FILL" 0; }
.cue-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cue-grid[hidden] { display: none; }
.cue {
  position: relative;
  border: 1px solid #ecebf5; border-radius: 18px; background: #fff;
  padding: 12px 12px 12px 14px;
  min-height: 108px;
}
.cue.done { background: #f7f7fa; }
.cue.done .cue-name { color: var(--faint); text-decoration: line-through; }
.tag { display: inline-block; background: var(--purple-soft); color: var(--purple); border-radius: 8px; padding: 4px 9px; font-size: 12px; font-weight: 700; }
.cue-name { margin: 8px 0 2px; font-size: 16px; font-weight: 800; padding-right: 64px; overflow-wrap: anywhere; }
.cue-cat { color: var(--muted); font-size: 13px; }
.cue-actions { position: absolute; top: 40px; right: 10px; display: flex; align-items: center; gap: 2px; }
.play-btn { border: 0; background: transparent; color: var(--purple); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.play-btn:hover { background: var(--purple-softer); }
.check-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2.5px solid #d6d6e2; background: #fff;
  display: grid; place-items: center; color: #fff;
}
.check-btn .ms { font-size: 18px; }
.check-btn.on { background: #33ad5e; border-color: #33ad5e; }
.list-title { margin: 10px 0 0; font-size: 18px; font-weight: 800; }
.todo-list { display: flex; flex-direction: column; gap: 12px; }
.todo {
  border: 1px solid #ecebf5; border-radius: 24px; background: #fff;
  padding: 18px 18px 16px 20px;
  display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; align-items: center;
}
.todo.done { opacity: 0.55; }
.todo.done .todo-name { text-decoration: line-through; }
.todo-name { margin: 0; font-size: 18px; font-weight: 800; grid-column: 1 / -1; }
.todo-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rv-chip { border: 0; border-radius: 12px; padding: 8px 12px; background: var(--purple-softer); color: var(--purple); font-weight: 700; font-size: 13px; }
.rv-chip.on { background: #e5f5ea; color: #23784a; }
.due { color: var(--muted); font-size: 14px; }
.due.soon { color: #c2410c; font-weight: 700; }
.todo-actions { display: flex; gap: 8px; }
.circle-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center; }
.circle-btn.ok { background: #e5f5ea; color: #33ad5e; }
.circle-btn.ok .ms { font-variation-settings: "FILL" 0, "wght" 600; }
.circle-btn.ok.on { background: #33ad5e; color: #fff; }
.circle-btn.go { background: var(--purple-soft); color: var(--purple); }
.circle-btn:hover { filter: brightness(0.97); }
.todo-time { color: var(--faint); font-size: 12px; }

/* ── 아래 메뉴 (좁은 화면) ───────────────────── */
.bottom-nav { display: none; }

/* ── 모달·토스트 ─────────────────────────────── */
.modal {
  border: 0; border-radius: 26px; padding: 0;
  width: min(440px, calc(100vw - 32px));
  box-shadow: 0 30px 80px rgba(16, 24, 44, 0.3);
}
.modal::backdrop { background: rgba(16, 24, 44, 0.35); }
.modal form { padding: 24px; }
.modal h2 { margin: 0 0 16px; font-size: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 13px; color: var(--muted); font-weight: 600; }
.field input, .field select {
  font: inherit; font-size: 15px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 14px; padding: 11px 12px; background: #fff;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.modal-actions .primary-btn { padding: 12px 22px; }
.shortcut-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 15px; }
.shortcut-list li { display: flex; justify-content: space-between; gap: 12px; }
.shortcut-list kbd { font: 600 13px ui-monospace, monospace; background: #f1f1f5; border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 60;
  display: flex; align-items: center; gap: 14px;
  background: #1c1f2e; color: #fff;
  padding: 13px 18px; border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  font-size: 14px;
  max-width: calc(100vw - 32px);
}
.toast[hidden] { display: none; }
.toast-action { border: 0; background: transparent; color: #b6abff; font-weight: 800; padding: 4px; }

/* ── 휴대폰 화면 (좁은 폭에서만 보임) ──────────── */
.desktop-only, .cat-btn kbd, .sync-pill span:last-child { display: none; }
.sync-pill { padding: 6px; margin-left: 0; }
.topbar-inner { padding: 14px 16px 10px; }
.brand h1 { font-size: 24px; }
.round-btn, .avatar { width: 42px; height: 42px; }
.top-actions { gap: 8px; }
.top-actions [data-action="shortcuts"] { display: none; }
body[data-view="home"] .col-todo,
body[data-view="todo"] .col-home,
body[data-view="todo"] .col-review { display: none; }
.cue-grid { grid-template-columns: repeat(2, 1fr); }
.todo-list { display: flex; }
.card { padding: 20px; }
.timer-card { padding: 22px; }
.elapsed { font-size: 40px; }
.stat { grid-template-columns: 46px 52px 1fr 76px; gap: 10px; }
.cmp { grid-template-columns: 52px 1fr 96px; }
.bottom-nav {
  display: grid; grid-template-columns: 1fr 1fr;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: #fff; border-top: 1px solid var(--line);
  padding: 8px 16px calc(10px + env(safe-area-inset-bottom));
}
.nav-item {
  border: 0; background: transparent; color: #b4b2c4;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 14px;
}
.nav-icon { width: 64px; height: 34px; border-radius: 999px; display: grid; place-items: center; }
.nav-item.active { color: var(--purple); }
.nav-item.active .nav-icon { background: var(--purple-soft); }
.toast { bottom: 96px; }

@media (max-width: 420px) {
  .app-note { font-size: 12px; }
  .cat-btn { font-size: 16px; gap: 10px; padding: 12px; }
  .cat-btn .cat-dot { width: 42px; height: 42px; }
  .quick-btn { padding: 12px; gap: 10px; }
  .quick-btn .cat-dot { width: 44px; height: 44px; }
  .cue-name { padding-right: 0; margin-bottom: 26px; }
  .cue-actions { top: auto; bottom: 10px; }
  .stat { grid-template-columns: 42px 44px 1fr 70px; gap: 8px; }
  .stat .cat-dot { width: 40px; height: 40px; }
  .stat .val { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* 넓은 화면은 PC 화면(app-pc.css), 좁은 화면은 휴대폰 화면 */
.d-shell { display: none; }
@media (min-width: 900px) {
  .m-shell { display: none; }
}

/* ── 실제 앱에서 더한 것 ───────────────────────── */
a.soft-btn { text-decoration: none; }
.app-note b { font-weight: 700; }
.sync-pill.bad { background: var(--danger-soft); color: var(--danger); }
.sync-pill.bad .dot { background: var(--danger); box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.2); }
.section-head h2 small { font-size: 12px; font-weight: 600; color: var(--faint); margin-left: 4px; }
.m-cancel { margin-left: auto; }
.stop-btn.resume { background: #33ad5e; box-shadow: 0 8px 18px rgba(51, 173, 94, 0.3); margin-left: auto; margin-right: 10px; }
.circle-btn.del { background: var(--danger-soft); color: var(--danger); }
.cue-actions .check-btn { cursor: default; }
.field-hint { margin: -4px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.empty { color: var(--muted); }

/* 로그인 전·불러오는 중: 앱 화면 대신 안내 */
.gate { display: none; }
body:not([data-auth="in"]) .gate {
  display: flex; flex: 1; align-items: center; justify-content: center;
  min-height: calc(100vh - 40px); padding: 24px 16px;
}
body:not([data-auth="in"]) .d-shell,
body:not([data-auth="in"]) .m-shell { display: none !important; }
.gate-card {
  width: 100%; max-width: 460px; background: var(--card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 32px 28px; text-align: center;
}
.gate-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-size: 18px; }
.gate-brand .d-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--purple); color: #fff; display: grid; place-items: center; }
.gate-brand .d-mark .ms { font-size: 19px; }
.gate-brand .d-badge { font-size: 11px; font-weight: 800; color: var(--purple); background: var(--purple-soft); border-radius: 6px; padding: 2px 6px; }
.gate-card h1 { margin: 22px 0 10px; font-size: 22px; line-height: 1.35; word-break: keep-all; }
.gate-card p { margin: 0 0 18px; color: var(--muted); line-height: 1.6; word-break: keep-all; }
.gate-login { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; font-size: 15px; }
.gate-login[hidden] { display: none; }
.gate-links { font-size: 13px; margin: 18px 0 0 !important; }
.gate-links a { color: var(--purple); }

/* 예정 블록 */
.legend .plan-dot { background: #b8bcc6; }
.routine-chip { display: flex; flex-wrap: wrap; gap: 8px; }
.routine-chip:empty { display: none; }
.plan-alert {
  position: fixed; left: 50%; top: 52px; transform: translateX(-50%); z-index: 70;
  width: min(560px, calc(100% - 32px));
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px dashed #8f84ee; border-radius: 16px;
  box-shadow: var(--shadow); padding: 12px 14px;
}
.plan-alert[hidden] { display: none; }
.plan-alert > .ms { color: var(--purple); }
.plan-alert-text { flex: 1; min-width: 0; line-height: 1.4; }
.plan-alert-text small { display: block; color: var(--muted); font-size: 12px; }
.plan-alert .primary-btn { padding: 8px 16px; }

/* 집중 보기 */
.focus-view {
  position: fixed; inset: 0; z-index: 55;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(16, 24, 44, 0.55); backdrop-filter: blur(6px);
}
.focus-view[hidden] { display: none; }
.focus-card {
  width: min(460px, 100%); background: var(--fire-surface); border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(16, 24, 44, 0.3); padding: 28px 24px; text-align: center;
}
.focus-kicker { margin: 0; color: #c4500e; font-weight: 800; font-size: 14px; }
.focus-card h2 { margin: 6px 0 4px; font-size: 20px; overflow-wrap: anywhere; }
.focus-left { font-size: clamp(56px, 18vw, 96px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--ink); }
.focus-view.ended .focus-left { color: var(--fire); }
.focus-bar { height: 8px; border-radius: 999px; background: var(--fire-soft); overflow: hidden; margin: 6px 0 10px; }
.focus-bar i { display: block; height: 100%; width: 0; background: var(--fire); transition: width 0.4s; }
.focus-elapsed { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.focus-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.focus-actions button { display: inline-flex; align-items: center; gap: 6px; }
.focus-actions .danger { color: var(--danger); }
.focus-note { margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.focus-choices { display: flex; gap: 10px; margin-bottom: 14px; }
.focus-choices button { flex: 1; justify-content: center; font-size: 16px; }
.check-row { flex-direction: row !important; align-items: center; gap: 8px !important; color: var(--ink) !important; }
