/* 멀티 타이머 & 스톱워치 */
:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --orange: #ea580c;
  --orange2: #c2410c;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,.07);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: 'Pretendard', 'Apple SD Gothic Neo', sans-serif; font-size: 14px; }

.wrap { max-width: 100%; padding: 0 0 60px; }

/* ── 헤더 ── */
.top { padding: 20px 0 16px; }
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 48px; height: 48px; flex-shrink: 0;
  background: linear-gradient(135deg, #ea580c, #dc2626);
  border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 22px;
}
h1 { font-size: 22px; font-weight: 700; }
.sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── 메인 탭 ── */
.tab-row { display: flex; gap: 4px; margin-bottom: 16px; }
.tab-btn {
  flex: 1; padding: 10px; border-radius: 8px; border: 1.5px solid var(--line);
  background: var(--bg); cursor: pointer; font-size: 13px; font-weight: 700;
  color: var(--muted); transition: all .12s; text-align: center;
}
.tab-btn.active { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ── 카드 ── */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); margin-bottom: 12px;
}
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; }

/* ── 패널 ── */
.panel { display: none; }
.panel.active { display: block; }

/* ============ 스톱워치 ============ */
.sw-display {
  text-align: center; font-size: 56px; font-weight: 800;
  font-family: 'JetBrains Mono', monospace; color: var(--ink);
  letter-spacing: -1px; padding: 20px 0;
}
.sw-display .ms { font-size: 32px; color: var(--muted); }
.sw-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.sw-btn {
  padding: 12px 24px; border-radius: 10px; border: none;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: all .12s; min-width: 90px;
}
.sw-btn.start  { background: #16a34a; color: #fff; }
.sw-btn.stop   { background: #dc2626; color: #fff; }
.sw-btn.lap    { background: #0284c7; color: #fff; }
.sw-btn.reset  { background: var(--line); color: var(--ink); }
.sw-btn:disabled { opacity: .4; cursor: not-allowed; }

.lap-list { max-height: 200px; overflow-y: auto; margin-top: 14px; }
.lap-item {
  display: flex; justify-content: space-between;
  padding: 6px 12px; font-size: 12px; font-family: monospace;
  border-bottom: 1px solid var(--line);
}
.lap-item:last-child { border-bottom: none; }
.lap-item .lap-num { color: var(--muted); }
.lap-item .lap-time { font-weight: 700; color: var(--ink); }
.lap-item .lap-split { color: var(--sky, #0284c7); }

/* ============ 타이머 ============ */
.timer-add-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.timer-add-row input {
  width: 64px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px;
  font-size: 14px; text-align: center; outline: none;
}
.timer-add-row input:focus { border-color: var(--orange); }
.timer-add-row label { font-size: 12px; color: var(--muted); font-weight: 600; margin: 0 4px 0 2px; }
.timer-add-btn {
  padding: 9px 16px; background: var(--orange); color: #fff;
  border: none; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.timer-add-btn:hover { background: var(--orange2); }

.timer-list { display: flex; flex-direction: column; gap: 10px; }
.timer-item {
  background: #fff7ed; border: 1.5px solid #fed7aa;
  border-radius: 10px; padding: 14px 16px;
}
.timer-item.running { border-color: var(--orange); background: #fff4ed; }
.timer-item.done { border-color: #16a34a; background: #f0fdf4; }
.ti-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ti-name-input {
  border: none; background: transparent; font-size: 14px; font-weight: 700;
  color: var(--ink); outline: none; flex: 1; min-width: 0;
}
.ti-display {
  font-size: 32px; font-weight: 800; font-family: 'JetBrains Mono', monospace;
  text-align: center; padding: 12px 0; color: var(--orange);
}
.timer-item.done .ti-display { color: #16a34a; }
.ti-btns { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.ti-btn {
  padding: 7px 14px; border-radius: 7px; border: none;
  font-size: 12px; font-weight: 700; cursor: pointer; transition: all .12s;
}
.ti-btn.start  { background: #16a34a; color: #fff; }
.ti-btn.stop   { background: #dc2626; color: #fff; }
.ti-btn.reset  { background: var(--line); color: var(--ink); }
.ti-btn.remove { background: #fee2e2; color: #dc2626; }
.ti-progress { height: 4px; background: var(--line); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.ti-progress-bar { height: 100%; background: var(--orange); transition: width .5s; border-radius: 2px; }
.timer-item.done .ti-progress-bar { background: #16a34a; }

/* ============ 뽀모도로 ============ */
.pomo-display {
  text-align: center; font-size: 72px; font-weight: 800;
  font-family: 'JetBrains Mono', monospace; padding: 20px 0; color: var(--orange);
}
.pomo-display.break { color: #0284c7; }
.pomo-status { text-align: center; font-size: 16px; font-weight: 700; color: var(--muted); margin-bottom: 14px; }
.pomo-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pomo-btn {
  padding: 12px 24px; border-radius: 10px; border: none;
  font-size: 14px; font-weight: 700; cursor: pointer; min-width: 90px;
}
.pomo-btn.start { background: var(--orange); color: #fff; }
.pomo-btn.stop  { background: #dc2626; color: #fff; }
.pomo-btn.reset { background: var(--line); color: var(--ink); }
.pomo-settings { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; justify-content: center; }
.ps-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ps-item label { font-size: 11px; color: var(--muted); font-weight: 700; }
.ps-item input {
  width: 64px; padding: 8px; border: 1.5px solid var(--line); border-radius: 8px;
  font-size: 16px; font-weight: 700; text-align: center; outline: none;
}
.pomo-count { text-align: center; margin-top: 12px; font-size: 13px; color: var(--muted); }
.pomo-dots { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.pomo-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.pomo-dot.done { background: var(--orange); }

/* ── 사용 안내 섹션 공통 ── */
.guide-section {
  margin-top: 24px; background: rgba(246,248,255,.6);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.guide-section h2 { font-size: 15px; font-weight: 800; margin: 0 0 10px; color: var(--ink); }
.guide-section h2:not(:first-child) { margin-top: 18px; }
.guide-steps, .guide-features, .guide-usecase {
  margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.8;
}
.guide-steps li, .guide-features li, .guide-usecase li { margin-bottom: 4px; }
.guide-steps strong, .guide-features strong { color: var(--ink); }
.guide-privacy {
  margin-top: 16px; background: #eff6ff; border: 1px solid rgba(37,99,235,.22);
  border-radius: 12px; padding: 12px 14px; font-size: 12px; color: #1e40af; line-height: 1.55;
}
