/* 공부 타이머 — 파이 타이머 스타일 (ver5 이식본)
   ⚠️ 손으로 고치지 마세요. node tools/ver5/port-timer.mjs <ver5폴더> 가 다시 만듭니다.
   front-timer.css **뒤에** 실어야 합니다. */

    :root {
      --mint:          #2ECBA8;
      --mint-dark:     #1A9E82;
      --mint-light:    #EDFAF6;
      --navy:          #1C1F33;
      --gray-bg:       #F7F8FA;
      --gray-border:   #EEF0F3;
      --gray-line:     #C8CDD6;
      --gray-text:     #6B7280;
      --white:         #FFFFFF;
      --gauge:         var(--mint);
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }
    html { scroll-behavior: smooth; scrollbar-gutter: stable; }

    body {
      font-family: 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
      background: var(--gray-bg);
      color: var(--navy);
      min-height: 100vh;
      display: flex; flex-direction: column;
    }

    a { text-decoration: none; color: inherit; }

    /* ══════════ 공통 래퍼 ══════════ */
    .page-wrap { flex: 1; }

    /* ══════════ NAV ══════════ */
    .site-nav { background: var(--white); border-bottom: 1px solid var(--gray-border); position: sticky; top: 0; z-index: 200; }
    .nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
    .nav-logo { font-size: 17px; font-weight: 900; color: var(--navy); white-space: nowrap; }
    .nav-logo span { color: var(--mint); }
    .nav-links { display: flex; gap: 2px; }
    .nav-links a { font-size: 13px; font-weight: 600; color: var(--gray-text); padding: 6px 11px; border-radius: 20px; transition: all 0.18s; white-space: nowrap; }
    .nav-links a:hover { color: var(--navy); background: var(--gray-bg); }
    .nav-links a.nav-active { color: var(--mint-dark); background: var(--mint-light); }
    .nav-mobile-menu a.nav-active { color: var(--mint-dark); }
    .nav-hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; width: 36px; height: 36px; }
    .nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: all 0.22s; }
    .nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-hamburger.open span:nth-child(2) { opacity: 0; }
    .nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .nav-mobile-menu { display: none; flex-direction: column; background: var(--white); border-top: 1px solid var(--gray-border); padding: 8px 16px 12px; }
    .nav-mobile-menu.open { display: flex; }
    .nav-mobile-menu a { font-size: 15px; font-weight: 600; color: var(--gray-text); padding: 12px 8px; border-bottom: 1px solid var(--gray-border); transition: color 0.18s; }
    .nav-mobile-menu a:last-child { border-bottom: none; }
    .nav-mobile-menu a:hover { color: var(--navy); }
    @media (max-width: 640px) {
      .nav-links { display: none; }
      .nav-hamburger { display: flex; }
    }

    /* ══════════ 상단 헤더 영역 ══════════ */
    .top-area {
      background: var(--white);
      position: relative;
      overflow: hidden;
      padding: 40px 24px 48px;
      text-align: center;
    }

    .top-area::before {
      content: '';
      position: absolute;
      inset: 0;
      background-image: radial-gradient(circle, var(--gray-line) 1.5px, transparent 1.5px);
      background-size: 28px 28px;
      opacity: 0.3;
      pointer-events: none;
    }

    .blob { position: absolute; pointer-events: none; }

    .topbar {
      position: relative;
      z-index: 2;
      display: flex;
      align-items: center;
      justify-content: center;
      max-width: 700px;
      margin: 0 auto 32px;
    }

    .back-btn {
      position: absolute;
      left: 0;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 14px;
      font-weight: 600;
      color: var(--gray-text);
      background: none;
      border: none;
      cursor: pointer;
      font-family: inherit;
      transition: color 0.18s;
      text-decoration: none;
    }
    .back-btn:hover { color: var(--navy); }

    .top-nav-title {
      font-size: 15px;
      font-weight: 700;
      color: var(--navy);
      opacity: 0.55;
    }

    .top-heading {
      position: relative;
      z-index: 2;
      font-size: 32px;
      font-weight: 900;
      color: var(--navy);
      letter-spacing: -0.5px;
      margin-bottom: 6px;
    }
    .top-heading .em { color: var(--mint-dark); }

    .top-sub {
      position: relative;
      z-index: 2;
      font-size: 15px;
      color: var(--gray-text);
      margin-top: 10px;
    }

    /* 그라디언트 전환 */
    .gradient-divider {
      height: 40px;
      background: linear-gradient(to bottom, var(--white) 0%, var(--gray-bg) 100%);
    }

    /* ══════════ 타이머 영역 ══════════ */
    .timer-section {
      max-width: 900px;
      margin: 0 auto;
      padding: 56px 24px 72px;
    }

    .timer-layout {
      display: flex;
      gap: 48px;
      align-items: flex-start;
      justify-content: center;
      flex-wrap: wrap;
    }

    .timer-display-col {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 28px;
    }

    .timer-face-wrap {
      width: 300px;
      height: 300px;
    }
    .timer-face-wrap svg { width: 100%; height: 100%; display: block; overflow: visible; }

    .face-circle { fill: var(--white); stroke: var(--gray-border); stroke-width: 2; }
    .gauge-sector { fill: var(--gauge); opacity: 0.9; }
    .tick-major { stroke: var(--navy); stroke-width: 2.5; }
    .tick-quarter { stroke: var(--navy); stroke-width: 4; stroke-linecap: round; }
    .tick-minor { stroke: var(--gray-line); stroke-width: 1.5; }

    .timer-digital {
      font-family: 'Consolas', 'DejaVu Sans Mono', 'Courier New', monospace;
      font-size: 32px;
      font-weight: 800;
      letter-spacing: 1px;
      color: var(--navy);
      font-variant-numeric: tabular-nums;
    }

    .timer-controls { display: flex; gap: 14px; }
    .timer-btn {
      padding: 16px 28px;
      border-radius: 14px;
      border: none;
      font-size: 16px;
      font-weight: 800;
      letter-spacing: -0.2px;
      cursor: pointer;
      font-family: inherit;
      transition: opacity 0.2s, transform 0.18s, filter 0.18s;
    }
    .timer-btn:active { transform: scale(0.97); }
    .timer-btn-toggle { background: var(--mint); color: var(--white); }
    .timer-btn-toggle:hover:not(:disabled) { filter: brightness(0.95); }
    .timer-btn-toggle.is-running { background: var(--navy); }
    .timer-btn-toggle:disabled { background: var(--gray-border); color: var(--gray-text); cursor: not-allowed; }
    .timer-btn-reset { background: var(--white); color: var(--gray-text); border: 1.5px solid var(--gray-border); }
    .timer-btn-reset:hover:not(:disabled) { color: var(--navy); border-color: var(--gray-line); }
    .timer-btn-reset:disabled { opacity: 0.4; cursor: not-allowed; }

    /* ══════════ 설정 패널 ══════════ */
    .timer-settings-col {
      width: 100%;
      max-width: 320px;
      background: var(--white);
      border-radius: 20px;
      padding: 28px 24px;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
      display: flex;
      flex-direction: column;
      gap: 26px;
    }

    .settings-group-label {
      font-size: 13px;
      font-weight: 800;
      color: var(--gray-text);
      margin-bottom: 10px;
      letter-spacing: 0.3px;
    }

    .quick-time-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .quick-time-btn {
      padding: 10px 0;
      border-radius: 10px;
      border: 1.5px solid var(--gray-border);
      background: var(--white);
      font-size: 14px;
      font-weight: 700;
      color: var(--navy);
      cursor: pointer;
      font-family: inherit;
      transition: all 0.15s;
    }
    .quick-time-btn:hover:not(:disabled) { border-color: var(--mint); background: var(--mint-light); color: var(--mint-dark); }
    .quick-time-btn:disabled { opacity: 0.4; cursor: not-allowed; }

    .direct-input-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
    .direct-input-row input {
      width: 56px; padding: 10px 6px;
      border-radius: 10px; border: 1.5px solid var(--gray-border);
      font-size: 15px; font-weight: 700; text-align: center;
      font-family: inherit; color: var(--navy);
    }
    .direct-input-row input:disabled { opacity: 0.5; cursor: not-allowed; }
    .direct-input-row span { color: var(--gray-text); font-weight: 700; font-size: 13px; }
    .timer-btn-apply {
      margin-left: auto;
      padding: 10px 14px;
      border-radius: 10px; border: none;
      background: var(--mint-dark); color: var(--white);
      font-size: 13px; font-weight: 700;
      cursor: pointer; font-family: inherit;
      transition: filter 0.15s;
    }
    .timer-btn-apply:hover:not(:disabled) { filter: brightness(0.95); }
    .timer-btn-apply:disabled { opacity: 0.4; cursor: not-allowed; }

    .toggle-row { display: flex; align-items: center; justify-content: space-between; }
    .toggle-row-label { font-size: 14px; font-weight: 600; color: var(--navy); }
    .switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
    .switch input { opacity: 0; width: 0; height: 0; }
    .switch-track {
      position: absolute; inset: 0; background: var(--gray-border);
      border-radius: 24px; cursor: pointer; transition: 0.2s;
    }
    .switch-track::before {
      content: ''; position: absolute; width: 18px; height: 18px;
      left: 3px; top: 3px; background: var(--white); border-radius: 50%;
      transition: 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }
    .switch input:checked + .switch-track { background: var(--mint); }
    .switch input:checked + .switch-track::before { transform: translateX(20px); }

    /* ══════════ FOOTER ══════════ */
    footer {
      background: var(--navy);
      color: white;
      padding: 32px 24px;
      text-align: center;
    }

    .footer-channels { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 4px; margin-bottom: 14px; }
    .footer-channels-label { font-size: 13px; color: #1DBFB0; font-weight: 600; margin-right: 6px; }
    .footer-channels a { font-size: 13px; color: rgba(255,255,255,0.75); transition: color 0.18s; padding: 0 8px; display: inline-flex; align-items: center; gap: 4px; }
    .footer-channels a:hover { color: white; }
    .footer-channels a:hover .channel-icon { opacity: 1; }
    .footer-channels span { color: rgba(255,255,255,0.3); font-size: 13px; }
    .channel-icon { width: 14px; height: 14px; opacity: 0.75; transition: opacity 0.18s; }
    .footer-copy { font-size: 13px; color: rgba(255,255,255,0.4); }

    /* ══════════ RESPONSIVE ══════════ */
    @media (max-width: 600px) {
      .top-heading { font-size: 26px; }
      .timer-section { padding: 40px 16px 52px; }
      .timer-face-wrap { width: 260px; height: 260px; }
      .timer-digital { font-size: 26px; }
      .timer-btn { padding: 14px 22px; font-size: 15px; }
    }
  