/**
 * beep — Sport Timer
 * https://github.com/jjllrrvvrr/beep
 *
 * Palette: #2DC799 | #FCBF16 | #BB0D3D | #FCF5F7 | #000000
 * Fonts: Archivo Black (logo), Inter (body)
 */

/* =============================================
   DESIGN TOKENS
   ============================================= */
:root {
  --black: #000000;
  --white: #FCF5F7;
  --green: #2DC799;
  --yellow: #FCBF16;
  --red: #BB0D3D;
  --card: #141414;
  --border: #222222;
  --muted: #888888;
}

/* =============================================
   RESET & BASE
   ============================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--black);
  color: var(--white);
  height: 100%;
  width: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background .3s, color .3s;
}

.hidden { display: none !important; }

/* =============================================
   LAYOUT — Views
   ============================================= */
.view {
  display: none;
  height: 100%;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.view.active { display: block; }

/* =============================================
   LAYOUT — Header
   ============================================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.nav-back {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: background .15s;
}

.nav-back:hover { background: var(--card); }

.nav-title {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav-spacer { width: 40px; }

/* =============================================
   LAYOUT — Home
   ============================================= */
.home-top {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 300;
}

.home-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 80px 20px 40px;
}

.home-title {
  font-family: 'Archivo Black', sans-serif;
  font-size: 4.5rem;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  margin-bottom: 40px;
  letter-spacing: -2px;
  text-transform: lowercase;
  position: relative;
}

.beep-pulse {
  display: inline-block;
  width: 15px;
  height: 15px;
  background: var(--green);
  border-radius: 50%;
  margin-left: 8px;
  vertical-align: super;
  animation: dotPulse 2.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

/* =============================================
   LAYOUT — Mode Grid
   ============================================= */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 420px;
}

.mode-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: transform .2s, border-color .2s;
}

.mode-card:hover {
  transform: translateY(-3px);
  border-color: var(--green);
}

.mode-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 14px;
  color: var(--green);
  font-size: 40px;
}

.mode-icon svg, .mode-icon .material-symbols-outlined {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: inherit;
  color: inherit;
}

.mode-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.mode-card p {
  font-size: 0.78rem;
  color: var(--muted);
}

/* =============================================
   COMPONENTS — Burger & Drawer
   ============================================= */
.burger {
  width: 48px;
  height: 48px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.burger:hover { border-color: var(--muted); }

.burger.open { background: var(--black); border-color: var(--border); }

.burger span {
  position: absolute;
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease, top .3s ease, background .3s;
}

.burger span:nth-child(1) { top: 17px; left: 14px; }
.burger span:nth-child(2) { top: 23px; left: 14px; }
.burger span:nth-child(3) { top: 29px; left: 14px; }

.burger.open span:nth-child(1) { top: 23px; transform: rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; transform: translateX(-4px); }
.burger.open span:nth-child(3) { top: 23px; transform: rotate(-45deg); }

.menu-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: flex-start;
  pointer-events: none;
  overflow: hidden;
}

.menu-drawer.open { pointer-events: auto; }

.menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity .3s ease;
}

.menu-drawer.open .menu-backdrop { opacity: 1; }

.menu-sheet {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  width: min(300px, 80vw);
  background: var(--card);
  border-left: 1px solid var(--border);
  padding: 80px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.menu-drawer.open .menu-sheet { transform: translateX(0); }

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 600;
}

.menu-item:last-of-type { border-bottom: none; }

.menu-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0 8px;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}

.menu-link:hover { color: var(--white); }

/* =============================================
   COMPONENTS — Toggle Switch
   ============================================= */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #333333;
  border: 1px solid #444444;
  border-radius: 28px;
  transition: .2s;
}

.slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 2px;
  bottom: 2px;
  background: var(--white);
  border-radius: 50%;
  transition: .2s;
}

input:checked + .slider {
  background: var(--green);
  border-color: var(--green);
}

input:checked + .slider::before {
  transform: translateX(22px);
  background: var(--black);
}

/* =============================================
   COMPONENTS — Config Screens
   ============================================= */
.config-screen {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 72px 20px 20px;
}

.config-body {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  flex: 1;
}

.config-actions {
  width: 100%;
  max-width: 320px;
  margin: 20px auto 0;
  padding-bottom: 20px;
}

.config-actions.dual {
  display: flex;
  gap: 12px;
}

.config-actions.dual button { flex: 1; }

.config-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.config-total {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  margin: 8px 0 16px;
}

/* =============================================
   COMPONENTS — Form Inputs
   ============================================= */
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.field-row:last-child { margin-bottom: 0; }

.field-row label {
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
}

.field-row input {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--white);
  font-size: 1rem;
  padding: 10px 12px;
  width: 80px;
  text-align: center;
  outline: none;
  transition: border-color .15s;
  appearance: textfield;
}

.field-row input:focus { border-color: var(--green); }

.field-row input::-webkit-outer-spin-button,
.field-row input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.time-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.time-inputs input { width: 56px; }

.time-inputs span { color: var(--muted); font-weight: 700; }

/* =============================================
   COMPONENTS — Repeat / Options Panel
   ============================================= */
.repeat-options {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.repeat-options .field-row:last-child { margin-bottom: 0; }

/* =============================================
   COMPONENTS — Buttons
   ============================================= */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--green);
  color: var(--black);
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: transform .15s, opacity .2s;
}

.btn-primary:hover { transform: translateY(-2px); opacity: 0.92; }

.btn-ghost {
  padding: 14px;
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}

.btn-ghost:hover { background: var(--card); }

.btn-add-step {
  width: 100%;
  max-width: 460px;
  margin: 0 auto 20px;
  padding: 14px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}

.btn-add-step:hover { border-color: var(--green); color: var(--green); }

.add-buttons {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto 20px;
}
.add-buttons .btn-add-step { margin: 0; flex: 1; }

.btn-add-group {
  flex: 1;
  padding: 14px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-add-group:hover { border-color: var(--yellow); color: var(--yellow); }

/* =============================================
   COMPONENTS — Group Card
   ============================================= */
.group-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.group-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px;
  cursor: pointer;
  transition: background .15s;
  flex-wrap: wrap;
}
.group-card-header:hover { background: #1a1a1a; }
.group-card-header .group-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  background: transparent;
  border: none;
  outline: none;
  flex: 1 1 auto;
  min-width: 0;
}
.group-card-header .group-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--yellow);
  background: rgba(252, 191, 22, 0.12);
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.group-card-header .group-summary {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
  margin-right: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}
.group-card-header .group-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.group-card-body {
  padding: 14px;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.group-card-body .step-card {
  margin-bottom: 0;
  border-radius: 10px;
  background: var(--black);
}
.group-repeat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.group-repeat-row label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}
.group-repeat-row input[type="number"] {
  width: 70px;
  background: var(--black);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--white);
  font-size: 0.9rem;
  padding: 8px;
  text-align: center;
  outline: none;
}
.group-repeat-row input[type="number"]:focus { border-color: var(--green); }

.timer-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  padding: 72px 20px 0;
  text-align: center;
}

.timer-top {
  min-height: 8vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.phase-badge {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--muted);
}

.phase-badge.effort { color: var(--red); }
.phase-badge.countdown { color: var(--yellow); }

.timer-display-xl {
  font-size: clamp(4.5rem, 18vw, 9rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 0.9;
  margin-bottom: 20px;
}

.timer-display-large {
  font-size: clamp(3.5rem, 12vw, 6rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 0.9;
  margin-bottom: 20px;
}

.progress-bar {
  width: 65%;
  max-width: 280px;
  height: 5px;
  background: var(--card);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--green);
  border-radius: 3px;
  transition: width 1s linear;
}

.timer-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 20px;
  font-variant-numeric: tabular-nums;
}

.next-up {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* =============================================
   COMPONENTS — Timer Controls (Uniform)
   ============================================= */
.timer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 24px;
  padding-bottom: 20px;
}

.btn-main {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--green);
  color: var(--black);
  border: none;
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, opacity .2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.btn-main:hover { transform: scale(1.04); opacity: 0.92; }
.btn-main:active { transform: scale(0.96); }
.btn-main.paused { background: var(--yellow); }

.btn-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--card);
  color: var(--white);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.btn-circle:hover { background: #1f1f1f; border-color: var(--muted); }

/* =============================================
   COMPONENTS — Lap List
   ============================================= */
.laps-list {
  width: 100%;
  max-width: 300px;
  max-height: 160px;
  overflow-y: auto;
  margin-top: 12px;
  margin-bottom: 20px;
}

.lap-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.lap-row:last-child { border-bottom: none; }

/* =============================================
   COMPONENTS — Complex Steps
   ============================================= */
.step-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-card.step-work { border-left: 3px solid var(--red); }
.step-card.step-rest { border-left: 3px solid var(--green); }

.step-card.step-work .step-type-select { color: var(--red); border-color: rgba(187, 13, 61, 0.4); }
.step-card.step-rest .step-type-select { color: var(--green); border-color: rgba(45, 199, 153, 0.4); }

.step-card.step-work .step-card-body label { color: var(--red); }
.step-card.step-rest .step-card-body label { color: var(--green); }

.step-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.step-card-header input[type="text"] {
  flex: 1;
  min-width: 100px;
  background: var(--black);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 8px 10px;
  outline: none;
}

.step-card-header input[type="text"]:focus { border-color: var(--green); }

.step-type-select {
  background: var(--black);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--white);
  font-size: 0.85rem;
  padding: 8px 10px;
  outline: none;
  cursor: pointer;
}

.step-card-body {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.step-card-body label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.step-card-body input {
  width: 56px;
  background: var(--black);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--white);
  font-size: 0.9rem;
  padding: 8px;
  text-align: center;
  outline: none;
  appearance: textfield;
}

.step-card-body input::-webkit-outer-spin-button,
.step-card-body input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.step-card-body input:focus { border-color: var(--green); }

.step-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.step-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: none;
  background: var(--black);
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}

.step-action-btn:hover { background: #252525; color: var(--white); }
.step-action-btn.del:hover { background: var(--red); color: var(--white); }

/* =============================================
   COMPONENTS — Timeline
   ============================================= */
.timeline-wrap {
  width: 100%;
  max-width: 700px;
  padding: 0 10px;
}

.timeline {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.timeline::-webkit-scrollbar { display: none; }

.timeline-item {
  flex-shrink: 0;
  min-width: 50px;
  height: 50px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--muted);
  text-align: center;
  padding: 4px;
  cursor: default;
  transition: all .25s ease;
}

.timeline-item .tl-dur {
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--white);
  margin-top: 2px;
}

.timeline-item.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--black);
  transform: scale(1.08);
}

.timeline-item.active .tl-dur { color: var(--black); }

.timeline-item.active.effort {
  background: var(--red);
  border-color: var(--red);
}

.timeline-item.done { opacity: 0.4; }

/* =============================================
   UTILITIES — Animations
   ============================================= */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.pulsing { animation: pulse 1s infinite; }

/* =============================================
   THEME — Light Mode Overrides
   ============================================= */
html[data-theme="light"] {
  --black: #ffffff;
  --white: #111111;
  --card: #f5f5f5;
  --border: #e0e0e0;
  --muted: #777777;
}

html[data-theme="light"] header {
  background: rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .burger.open { background: #ffffff; border-color: #cccccc; }

html[data-theme="light"] .menu-sheet {
  background: #ffffff;
  border-color: var(--border);
}

html[data-theme="light"] .menu-link:hover { color: var(--black); }

html[data-theme="light"] .switch .slider { background: #cccccc; border-color: #cccccc; }
html[data-theme="light"] .switch .slider::before { background: #ffffff; }
html[data-theme="light"] input:checked + .slider { background: var(--green); border-color: var(--green); }
html[data-theme="light"] input:checked + .slider::before { background: #ffffff; }

html[data-theme="light"] .step-card {
  background: #eeeeee;
  border-color: var(--border);
}

html[data-theme="light"] .step-card.step-work .step-type-select { color: var(--red); border-color: rgba(187, 13, 61, 0.4); }
html[data-theme="light"] .step-card.step-rest .step-type-select { color: var(--green); border-color: rgba(45, 199, 153, 0.4); }

html[data-theme="light"] .step-card-header input,
html[data-theme="light"] .step-type-select,
html[data-theme="light"] .step-card-body input {
  background: #e0e0e0;
  color: var(--white);
  border-color: #cccccc;
}

html[data-theme="light"] .repeat-options {
  background: #eeeeee;
  border-color: var(--border);
}

html[data-theme="light"] .step-action-btn {
  background: #e0e0e0;
  color: var(--muted);
}

html[data-theme="light"] .timeline-item {
  background: #eeeeee;
  border-color: var(--border);
}

html[data-theme="light"] .laps-list .lap-row {
  border-bottom-color: var(--border);
}

.step-card.dragging { opacity: 0.6; transform: scale(0.98); }
.step-card.drop-target { border-color: var(--green); box-shadow: 0 0 0 2px rgba(45, 199, 153, 0.25); }

.group-card.dragging { opacity: 0.6; transform: scale(0.98); }
.group-card.drop-target { border-color: var(--green); box-shadow: 0 0 0 2px rgba(45, 199, 153, 0.25); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 480px) {
  .home-title { font-size: 2.4rem; }
  .mode-card { padding: 22px 12px; }
  .mode-icon { width: 36px; height: 36px; margin-bottom: 10px; }
  .mode-card h2 { font-size: 1rem; }
  .mode-card p { font-size: 0.72rem; }

  .timer-screen { padding: 56px 16px 0; }
  .btn-main { width: 100px; height: 100px; font-size: 1rem; }
  .btn-circle { width: 60px; height: 60px; font-size: 0.78rem; }
  .timer-actions { gap: 12px; }
  .timer-display-xl { font-size: clamp(4rem, 20vw, 7rem); }
  .timer-display-large { font-size: clamp(3rem, 14vw, 5rem); }
  .timer-top { min-height: 6vh; }
  .timeline-item { min-width: 44px; height: 44px; font-size: 0.6rem; }
}

@media (min-width: 768px) {
  .mode-grid { gap: 18px; }
  .mode-card { padding: 32px 20px; }
  .mode-icon { width: 48px; height: 48px; margin-bottom: 16px; }
  .config-screen { padding: 80px 40px 40px; }
  .btn-main { width: 140px; height: 140px; font-size: 1.2rem; }
  .btn-circle { width: 80px; height: 80px; font-size: 0.9rem; }
}
