/* 수업 타이머 · 활동 순서 · 스톱워치 */
.ct { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; --ct: var(--primary); }
.ct-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 5px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--text) 5%, var(--surface)); border: 1px solid var(--line); }
.ct-tab { min-height: 44px; border: 0; border-radius: calc(var(--r-lg) - 5px); background: none; color: var(--muted); font-size: 15px; font-weight: 800; cursor: pointer; }
.ct-tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm); }

.ct-stage { position: relative; display: grid; justify-items: center; gap: 14px; padding: clamp(18px, 4vw, 34px); border-radius: calc(var(--r-lg) + 6px); background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--ct) 12%, var(--surface)), var(--surface) 70%); border: 1px solid var(--line); box-shadow: var(--sh-md); transition: background .4s; }
.ct-stage.warn { --ct: #f08c00; }
.ct-stage.danger { --ct: #e5484d; }
.ct-stage.done { --ct: #e5484d; }
.ct-top { display: flex; align-items: center; gap: 8px; width: 100%; }
.ct-label { flex: 1; width: 0; min-width: 0; min-height: 44px; padding: 0 4px; border: 0; border-bottom: 2px dashed transparent; background: none; text-align: center; font-size: clamp(18px, 3vw, 26px); font-weight: 800; letter-spacing: -.03em; color: var(--text); outline: none; }
.ct-label:hover, .ct-label:focus { border-bottom-color: var(--line-strong); }
.ct-label::placeholder { color: var(--subtle); font-weight: 600; }
.ct-icons { display: flex; gap: 6px; }
.ct-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); font-size: 19px; cursor: pointer; }

.ct-dial { position: relative; width: min(440px, 82vw); aspect-ratio: 1; }
.ct-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ct-track { fill: none; stroke: color-mix(in srgb, var(--text) 8%, transparent); stroke-width: 10; }
.ct-bar { fill: none; stroke: var(--ct); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 1000; stroke-dashoffset: 1000; transition: stroke .4s; }
.is-watch .ct-bar { transition: none; }
.ct-read { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center; padding: 0 12%; }
.ct-time { font-size: clamp(56px, 15vw, 120px); font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.ct-time.long { font-size: clamp(42px, 11vw, 92px); }
.ct-step { color: var(--ct); font-weight: 800; font-size: clamp(15px, 2.6vw, 20px); min-height: 1.4em; }
.ct-next { color: var(--muted); font-size: clamp(12.5px, 2vw, 15px); min-height: 1.4em; }
.danger .ct-time { color: #e5484d; }
@media (prefers-reduced-motion: no-preference) {
  .danger .ct-time { animation: ct-pulse 1s ease-in-out infinite; }
  .done .ct-dial { animation: ct-shake .5s ease-in-out 3; }
  @keyframes ct-pulse { 50% { opacity: .55; } }
  @keyframes ct-shake { 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
}

.ct-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ct-btn { min-height: 52px; min-width: 96px; padding: 0 20px; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--surface); color: var(--text); font-size: 16px; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.ct-btn.main { min-width: 170px; min-height: 60px; border-color: transparent; background: var(--ct); color: #fff; font-size: 19px; box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--ct) 80%, transparent); }
.ct-btn.main.pause { background: var(--text); }
.ct-controls.small .ct-btn { min-height: 42px; font-size: 14.5px; min-width: 0; }
.ct-keys { margin: 0; }
.ct-keys kbd { margin: 0 2px; }

/* 전체 화면 */
.ct-stage:fullscreen, .ct-stage.pseudo-full { align-content: center; border-radius: 0; border: 0; }
.ct-stage:fullscreen .ct-dial, .ct-stage.pseudo-full .ct-dial { width: min(78vh, 90vw); }
.ct-stage:fullscreen .ct-time, .ct-stage.pseudo-full .ct-time { font-size: min(22vh, 19vw); }
.ct-stage:fullscreen .ct-time.long, .ct-stage.pseudo-full .ct-time.long { font-size: min(15vh, 13vw); }
.ct-stage:fullscreen .ct-keys, .ct-stage.pseudo-full .ct-keys { display: none; }
.ct-stage.pseudo-full { position: fixed; inset: 0; z-index: 100; }

/* 설정 영역 */
.ct > * { min-width: 0; }
.ct-pane { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.ct-pane .field-label { display: block; margin-bottom: 6px; }
.ct-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.ct-presets button { min-height: 46px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--text); font-size: 15.5px; font-weight: 800; cursor: pointer; }
.ct-presets button.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); color: var(--link); }
.ct-custom-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; }
.ct-custom-row input, .ct-dur input { width: 70px; min-height: 42px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-size: 16px; text-align: center; }
.ct-check { display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.ct-check input { width: 18px; height: 18px; accent-color: var(--primary); }
.ct-pane-hint { margin: 0; }
.ct-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ct-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.ct-no { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--primary) 12%, var(--surface)); color: var(--link); font-size: 13px; font-weight: 800; }
.ct-steps li > input { min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 15.5px; font-weight: 700; min-width: 0; }
.ct-dur { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.ct-dur input { width: 58px; }
.ct-step-btns { display: inline-flex; }
.ct-mini { width: 34px; height: 34px; border: 0; border-radius: 10px; background: none; color: var(--subtle); cursor: pointer; font-size: 15px; }
.ct-mini:disabled { opacity: .3; }
.ct-step-add { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ct-total { color: var(--muted); font-weight: 700; font-size: 14px; }
.ct-templates { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ct-templates .field-label { margin: 0 6px 0 0; }
.ct-laps-head { display: flex; justify-content: space-between; align-items: center; }
.ct-laps { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; max-height: 320px; overflow-y: auto; }
.ct-laps li { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--text) 3.5%, var(--surface)); font-variant-numeric: tabular-nums; }
.ct-laps span { color: var(--muted); font-size: 13.5px; font-weight: 700; }
.ct-laps b { font-size: 18px; }
.ct-laps small { color: var(--subtle); }
.ct-empty { margin: 0; }

@media (max-width: 560px) {
  .ct-tab { font-size: 14px; }
  .ct-btn { min-width: 80px; padding: 0 14px; }
  .ct-btn.main { min-width: 140px; }
  .ct-steps li { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .ct-steps .ct-dur { grid-column: 2 / 3; }
  .ct-step-btns { grid-row: 1; grid-column: 3; }
  .ct-keys { display: none; }
}
