:root {
  --bg: #1f2026;
  --bg-soft: #232836;
  --panel-bg: #0c1b32;
  --panel-bg-soft: #102342;
  --panel-surface: rgba(8, 19, 36, 0.76);
  --panel-surface-strong: rgba(7, 17, 31, 0.9);
  --panel-border: rgba(148, 163, 184, 0.12);
  --panel-shadow: 0 12px 28px rgba(2, 8, 23, 0.22);
  --text-main: #f8fafc;
  --text-soft: #d6e7ff;
  --text-muted: #8ba0bf;
  --text-dim: #6e819b;
  --cyan: #74e5ff;
  --cyan-strong: #2bc4e7;
  --orange: #f59e0b;
  --orange-strong: #f97316;
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.18);
  --success: #38d39f;
  --violet-metal-1: rgba(103, 125, 150, 0.94);
  --violet-metal-2: rgba(37, 60, 87, 0.92);
  --violet-metal-3: rgba(191, 225, 255, 0.88);
  --body-top-glow: rgba(14, 165, 198, 0.08);
  --body-bottom-glow: rgba(249, 115, 22, 0.08);
  --body-base: linear-gradient(180deg, #1d1f25, #222833);
  --chip-bg: rgba(15, 39, 71, 0.72);
  --chip-active-bg: linear-gradient(180deg, rgba(18, 114, 139, 0.94), rgba(12, 88, 112, 0.98));
  --chip-active-text: #f8fafc;
  --fps-active-bg: linear-gradient(180deg, rgba(245, 158, 11, 0.96), rgba(249, 115, 22, 0.92));
  --action-bg: rgba(11, 24, 43, 0.82);
  --action-danger-bg: rgba(66, 20, 34, 0.42);
  --action-danger-text: #ffd2db;
  --action-secondary-border: rgba(103, 232, 249, 0.24);
  --action-secondary-bg: rgba(11, 24, 43, 0.82);
  --action-secondary-text: #d9f9ff;
  --action-copied-bg: rgba(27, 76, 61, 0.45);
  --action-copied-text: #d4fff1;
  --item-bg: rgba(8, 19, 36, 0.66);
  --delete-bg: rgba(63, 24, 37, 0.42);
  --input-bg: rgba(7, 17, 31, 0.9);
  --static-bg: rgba(11, 24, 43, 0.78);
  --stopwatch-core-bg: linear-gradient(180deg, rgba(11, 32, 56, 0.98), rgba(7, 20, 38, 0.98));
  --stopwatch-core-border: rgba(116, 229, 255, 0.12);
  --stopwatch-inner-bg: linear-gradient(180deg, rgba(18, 74, 110, 0.26), rgba(8, 26, 45, 0.08));
  --chevron-color: rgba(214, 231, 255, 0.84);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --max-width: 1100px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f5f8;
  --bg-soft: #e7ebf1;
  --panel-bg: #ffffff;
  --panel-bg-soft: #f5f7fa;
  --panel-surface: rgba(232, 237, 244, 0.86);
  --panel-surface-strong: rgba(255, 255, 255, 0.98);
  --panel-border: rgba(120, 140, 162, 0.2);
  --panel-shadow: 0 18px 36px rgba(83, 101, 122, 0.12);
  --text-main: #162130;
  --text-soft: #38506a;
  --text-muted: #68798d;
  --text-dim: #7d8fa4;
  --cyan: #147eb7;
  --cyan-strong: #0d6f9d;
  --orange: #f59e0b;
  --orange-strong: #ea6d1a;
  --danger: #d9485f;
  --danger-soft: rgba(217, 72, 95, 0.16);
  --success: #13886b;
  --violet-metal-1: rgba(198, 208, 220, 0.96);
  --violet-metal-2: rgba(148, 165, 184, 0.94);
  --violet-metal-3: rgba(245, 249, 255, 0.98);
  --body-top-glow: rgba(20, 126, 183, 0.08);
  --body-bottom-glow: rgba(245, 158, 11, 0.12);
  --body-base: linear-gradient(180deg, #fbfcfe, #edf2f7);
  --chip-bg: rgba(227, 233, 241, 0.92);
  --chip-active-bg: linear-gradient(180deg, rgba(33, 117, 164, 0.94), rgba(20, 97, 142, 0.98));
  --chip-active-text: #f8fafc;
  --fps-active-bg: linear-gradient(180deg, rgba(245, 158, 11, 0.94), rgba(234, 109, 26, 0.92));
  --action-bg: rgba(236, 240, 245, 0.96);
  --action-danger-bg: rgba(253, 232, 237, 0.96);
  --action-danger-text: #b64057;
  --action-secondary-border: rgba(20, 126, 183, 0.24);
  --action-secondary-bg: rgba(232, 239, 246, 0.98);
  --action-secondary-text: #16638f;
  --action-copied-bg: rgba(219, 245, 237, 0.96);
  --action-copied-text: #167258;
  --item-bg: rgba(238, 242, 247, 0.96);
  --delete-bg: rgba(253, 232, 237, 0.96);
  --input-bg: rgba(255, 255, 255, 0.98);
  --static-bg: rgba(240, 244, 249, 0.98);
  --stopwatch-core-bg: linear-gradient(180deg, rgba(248, 251, 255, 0.99), rgba(236, 242, 248, 0.99));
  --stopwatch-core-border: rgba(20, 126, 183, 0.14);
  --stopwatch-inner-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(231, 238, 246, 0.82));
  --chevron-color: rgba(48, 67, 89, 0.88);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, var(--body-top-glow), transparent 32%),
    radial-gradient(circle at bottom right, var(--body-bottom-glow), transparent 28%),
    var(--body-base);
  color: var(--text-main);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
summary {
  font: inherit;
}

button,
input {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding:
    calc(env(safe-area-inset-top, 0px) + var(--space-3))
    var(--space-3)
    calc(env(safe-area-inset-bottom, 0px) + var(--space-5));
  display: grid;
  gap: var(--space-3);
}

.brand-lockup {
  display: flex;
  justify-content: center;
}

.brand-lockup-outside {
  margin-bottom: 2px;
}

.brand-logo {
  display: block;
  width: min(100%, 360px);
  height: auto;
}

.panel {
  background: linear-gradient(180deg, var(--panel-bg) 0%, var(--panel-bg-soft) 100%);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--panel-shadow);
}

.hero-panel {
  padding: var(--space-3);
  display: grid;
  gap: var(--space-4);
}

.stopwatch-stage {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
}

.stopwatch-button {
  --progress: 0deg;
  --hand-angle: 0deg;
  --trail-span: 0deg;
  --trail-soft: 0deg;
  --trail-mid: 0deg;
  --trail-core: 0deg;
  position: relative;
  width: min(82vw, 360px);
  aspect-ratio: 1;
  border: none;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.04), transparent 42%),
    conic-gradient(
      from calc(var(--progress) - var(--trail-span)),
      rgba(249, 115, 22, 0) 0deg,
      rgba(249, 115, 22, 0.08) var(--trail-soft),
      rgba(249, 115, 22, 0.2) var(--trail-mid),
      rgba(249, 115, 22, 0.38) var(--trail-core),
      rgba(245, 158, 11, 0.78) var(--trail-span),
      rgba(249, 115, 22, 0.08) calc(var(--trail-span) + 0.45deg),
      rgba(249, 115, 22, 0) calc(var(--trail-span) + 1.8deg),
      rgba(249, 115, 22, 0) 360deg
    ),
    conic-gradient(
      from 0deg,
      rgba(24, 78, 125, 0.9) 0deg,
      rgba(33, 117, 164, 0.92) 88deg,
      rgba(14, 48, 82, 0.92) 220deg,
      rgba(24, 78, 125, 0.9) 360deg
    );
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.12),
    0 16px 28px rgba(2, 8, 23, 0.28);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition:
    transform 160ms ease,
    box-shadow 180ms ease;
}

.stopwatch-button * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

.stopwatch-button::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: var(--stopwatch-core-bg);
  border: 1px solid var(--stopwatch-core-border);
}

.stopwatch-button::after {
  content: "";
  position: absolute;
  inset: 38px;
  border-radius: 50%;
  background: var(--stopwatch-inner-bg);
  border: 1px solid rgba(191, 219, 254, 0.05);
}

.stopwatch-button:hover {
  transform: translateY(-1px);
}

.stopwatch-button.is-running {
  box-shadow:
    0 0 0 1px rgba(245, 158, 11, 0.34),
    0 0 22px rgba(249, 115, 22, 0.16),
    0 16px 28px rgba(2, 8, 23, 0.3);
}

.stopwatch-marks {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from 0deg,
      rgba(215, 220, 236, 0.86) 0deg 0.9deg,
      rgba(92, 99, 121, 0.34) 0.9deg 4deg,
      transparent 4deg 6deg
    ),
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.18), transparent 28%),
    conic-gradient(
      from 0deg,
      var(--violet-metal-1) 0deg,
      var(--violet-metal-2) 72deg,
      var(--violet-metal-3) 178deg,
      var(--violet-metal-2) 252deg,
      var(--violet-metal-1) 360deg
    );
  -webkit-mask: radial-gradient(circle, transparent 68%, #000 68%, #000 74%, transparent 75%);
  mask: radial-gradient(circle, transparent 68%, #000 68%, #000 74%, transparent 75%);
  opacity: 0.92;
  z-index: 1;
}

.stopwatch-hand {
  position: absolute;
  left: 50%;
  top: 18%;
  width: 3px;
  height: 34%;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--orange), var(--orange-strong));
  transform-origin: center bottom;
  transform: translateX(-50%) rotate(var(--hand-angle));
  box-shadow: 0 0 9px rgba(249, 115, 22, 0.26);
  z-index: 2;
}

.stopwatch-hand::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--orange);
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
}

.stopwatch-face {
  position: absolute;
  inset: 18px;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 44px 20px 24px;
  text-align: center;
}

.digital-frames {
  font-size: clamp(3rem, 12vw, 4.85rem);
  font-weight: 700;
  line-height: 0.92;
  color: var(--cyan);
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  transition:
    transform 180ms ease,
    color 180ms ease;
}

.digital-frames-number {
  font-weight: 700;
}

.digital-frames-suffix {
  margin-left: 0.12em;
  font-size: 0.44em;
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.08;
}

.digital-frames.is-updating {
  animation: value-pop 320ms ease;
}

.digital-context-metric {
  min-height: 20px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-soft);
  margin-top: 12px;
}

.digital-context-metric strong {
  color: var(--cyan);
}

.digital-context-value {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.1em;
}

.digital-context-value-number {
  font-weight: 700;
}

.digital-context-value-suffix {
  font-size: 0.72em;
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.05;
}

.digital-context-metric.is-hidden {
  visibility: hidden;
}

.digital-seconds {
  font-size: 0.96rem;
  color: var(--text-soft);
  margin-top: -2px;
}

.dial-context {
  display: grid;
  place-items: center;
  min-height: 36px;
}

.dial-context > * {
  grid-area: 1 / 1;
}

.dial-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  text-align: center;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.capture-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0;
  color: var(--cyan);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.dial-hint.is-hidden,
.capture-badge.is-hidden {
  display: inline-flex !important;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.hero-controls {
  display: grid;
  gap: var(--space-3);
}

.mode-block {
  display: grid;
  gap: var(--space-2);
}

.mode-toggle,
.fps-group,
.settings-toggle,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.mode-pill,
.fps-chip,
.settings-chip {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: var(--chip-bg);
  color: var(--text-soft);
  padding: 0 16px;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.mode-pill {
  flex: 1 1 92px;
  font-size: 0.86rem;
  font-weight: 700;
}

.settings-chip,
.fps-chip {
  font-size: 0.84rem;
  font-weight: 700;
}

.mode-pill.is-active,
.settings-chip.is-active {
  background: var(--chip-active-bg);
  border-color: rgba(103, 232, 249, 0.34);
  color: var(--chip-active-text);
}

.fps-chip.is-active {
  background: var(--fps-active-bg);
  border-color: rgba(249, 115, 22, 0.36);
  color: #16181d;
}

.mode-pill:hover,
.fps-chip:hover,
.settings-chip:hover,
.action-button:hover {
  transform: translateY(-1px);
}

.action-row {
  justify-content: center;
}

.action-button {
  min-width: 118px;
  min-height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: var(--action-bg);
  color: var(--text-soft);
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    transform 140ms ease,
    color 140ms ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.action-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.action-button span {
  font-size: 0.76rem;
  font-weight: 700;
  text-align: left;
  line-height: 1;
  white-space: nowrap;
}

.action-button[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.action-button-destructive {
  border-color: rgba(251, 113, 133, 0.26);
  background: var(--action-danger-bg);
  color: var(--action-danger-text);
}

.action-button-destructive svg {
  color: var(--danger);
}

.action-button-secondary {
  border-color: var(--action-secondary-border);
  background: var(--action-secondary-bg);
  color: var(--action-secondary-text);
}

.action-button-inline {
  min-width: auto;
  grid-auto-flow: column;
  gap: 8px;
  padding-inline: 14px;
}

.action-button.is-copied {
  border-color: rgba(56, 211, 159, 0.28);
  background: var(--action-copied-bg);
  color: var(--action-copied-text);
}

.secondary-grid {
  display: grid;
  gap: var(--space-3);
}

.side-stack {
  display: grid;
  gap: var(--space-3);
}

.summary-panel.is-hidden {
  display: none;
}

.collapsible-panel {
  overflow: hidden;
}

.collapsible-head {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3);
  cursor: pointer;
  user-select: none;
}

.collapsible-head::-webkit-details-marker {
  display: none;
}

.collapsible-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.collapsible-head h2.no-dot::before {
  display: none;
}

.collapsible-head h2::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  flex: 0 0 auto;
}

.title-with-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--orange);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex: 0 0 auto;
}

.collapsible-chevron {
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--chevron-color);
  border-bottom: 2px solid var(--chevron-color);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.collapsible-panel[open] .collapsible-chevron {
  transform: rotate(225deg);
}

.collapsible-body {
  display: grid;
  gap: var(--space-3);
  padding: 0 var(--space-3) var(--space-3);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.summary-body {
  padding-top: var(--space-3);
}

.stats-grid {
  display: grid;
  gap: var(--space-2);
}

.stat-card {
  display: grid;
  gap: 8px;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--panel-surface);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.stat-label {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.stat-card strong {
  font-size: 2rem;
  line-height: 1;
  color: var(--cyan);
}

.stat-detail {
  color: var(--text-soft);
  font-size: 0.98rem;
}

.summary-breakdown {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.captures-panel {
  display: grid;
  gap: var(--space-2);
}

.captures-panel.is-hidden {
  display: none;
}

.captures-head h3 {
  margin: 0;
  font-size: 0.94rem;
}

.session-hint {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.captures-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.capture-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2);
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--item-bg);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.capture-item-title {
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 700;
}

.capture-item-meta {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.capture-delete {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(251, 113, 133, 0.22);
  background: var(--delete-bg);
  color: #ffc8d2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.capture-delete svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.field-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.settings-block {
  display: grid;
  gap: 10px;
}

.desktop-only {
  display: none;
}

.converter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group input {
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-md);
  padding: 0 14px;
  background: var(--input-bg);
  color: var(--text-main);
}

.converter-static-value {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-md);
  background: var(--static-bg);
  color: var(--text-soft);
  font-weight: 700;
}

.converter-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--panel-surface);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.converter-result strong {
  display: block;
  margin-top: 4px;
  font-size: 1.28rem;
  color: var(--cyan);
}

.converter-breakdown {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.help-grid {
  display: grid;
  gap: var(--space-2);
}

.help-card {
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--item-bg);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.help-card h3 {
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.help-card p {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

.help-card p + p {
  margin-top: 8px;
}

.video-panel {
  margin-top: 2px;
}

.video-analysis-body {
  padding-top: var(--space-3);
}

.video-url-row {
  display: grid;
  gap: 8px;
}

.video-url-actions {
  display: grid;
  gap: 8px;
}

.video-url-group input {
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-md);
  padding: 0 14px;
  background: var(--input-bg);
  color: var(--text-main);
}

.video-status {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.86rem;
}

.video-status.is-error {
  color: var(--danger);
}

.video-status.is-success {
  color: var(--cyan);
}

.video-layout {
  display: block;
}

.video-player-panel {
  display: grid;
  gap: var(--space-3);
}

.video-embed-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--panel-surface);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.video-embed-shell.is-empty {
  display: grid;
  place-items: center;
}

.video-embed {
  width: 100%;
  height: 100%;
}

.video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-embed-shell.is-empty .video-embed {
  display: none;
}

.video-embed-placeholder {
  margin: 0;
  max-width: 32ch;
  padding: 0 var(--space-3);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.video-marks-card {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--panel-surface);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.video-timeline-card {
  display: grid;
  gap: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.video-time-label {
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.video-marks-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 8px 14px;
}

.video-marks-head strong {
  font-size: 1.02rem;
  color: var(--text-main);
}

.video-current-frame {
  color: var(--cyan);
  font-size: 0.94rem;
  font-weight: 700;
  white-space: nowrap;
  justify-self: end;
  align-self: center;
}

.video-timeline {
  position: relative;
  height: 42px;
  border-radius: 0;
  background: transparent;
  border: none;
  overflow: visible;
  cursor: pointer;
  box-shadow: none;
}

.video-timeline::before {
  content: "";
  position: absolute;
  inset: 7px 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(56, 74, 108, 0.94), rgba(42, 60, 92, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(7, 17, 31, 0.16);
}

.video-timeline-progress {
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 3px;
  left: 0%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--cyan), var(--cyan-strong));
  box-shadow: 0 0 14px rgba(116, 229, 255, 0.32);
  z-index: 2;
}

.video-timeline-markers {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.video-timeline-marker {
  position: absolute;
  top: 0;
  bottom: 2px;
  width: 20px;
  border: none;
  background: transparent;
  transform: translateX(-50%);
  cursor: pointer;
}

.video-timeline-marker::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 12px;
  bottom: 2px;
  width: 2px;
  background: rgba(245, 158, 11, 0.9);
  transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.16);
}

.video-timeline-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 2px;
  width: 12px;
  height: 12px;
  background: var(--orange);
  border: 1px solid rgba(255, 255, 255, 0.86);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.video-timeline-marker:hover::before,
.video-timeline-marker:focus-visible::before {
  background: rgba(255, 196, 110, 0.98);
}

.video-timeline-marker:hover::after,
.video-timeline-marker:focus-visible::after {
  background: #ffbf68;
  outline: none;
}

.video-timeline-legend {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.video-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: -2px;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.video-icon-button {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: var(--action-bg);
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.video-icon-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.video-timeline-marker,
.video-mark-jump,
.video-mark-delete {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.video-icon-button:hover {
  transform: translateY(-1px);
}

.video-icon-button[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.video-icon-button-primary {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(73, 43, 8, 0.92);
  color: var(--orange);
}

.video-icon-button-play {
  width: 56px;
  height: 56px;
  border-color: rgba(116, 229, 255, 0.26);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 0 0 4px rgba(116, 229, 255, 0.08);
}

.video-icon-button-danger {
  border-color: rgba(251, 113, 133, 0.22);
  background: var(--delete-bg);
  color: #ffc8d2;
}

.video-icon-button-primary svg {
  fill: currentColor;
  stroke: none;
}

.video-play-icon path {
  fill: currentColor;
  stroke: none;
}

.video-play-icon,
.video-pause-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  transition: opacity 140ms ease;
}

.video-play-icon {
  opacity: 1;
}

.video-pause-icon {
  opacity: 0;
}

.video-icon-button.is-playing .video-play-icon {
  opacity: 0;
}

.video-icon-button.is-playing .video-pause-icon {
  opacity: 1;
}

.video-icon-button.is-copied {
  border-color: rgba(56, 211, 159, 0.28);
  background: var(--action-copied-bg);
  color: var(--action-copied-text);
}

.video-controls-divider {
  width: 1px;
  height: 22px;
  background: rgba(148, 163, 184, 0.24);
  border-radius: 999px;
}

.video-marks-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.video-mark-empty {
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--item-bg);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.video-mark-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--item-bg);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.video-mark-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.video-mark-heading {
  display: grid;
  gap: 4px;
}

.video-mark-title {
  color: var(--text-main);
  font-size: 0.94rem;
  font-weight: 700;
}

.video-mark-main-value {
  color: var(--text-soft);
  font-size: 0.88rem;
}

.video-mark-actions {
  display: inline-flex;
  gap: 8px;
}

.video-mark-jump,
.video-mark-delete {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: var(--action-bg);
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.video-mark-delete {
  border-color: rgba(251, 113, 133, 0.22);
  background: var(--delete-bg);
  color: #ffc8d2;
}

.video-mark-jump svg,
.video-mark-delete svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.video-mark-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.video-mark-metric {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(10, 22, 39, 0.44);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.video-mark-metric-label {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.video-mark-metric-value {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.video-mark-delta .video-mark-metric-value {
  color: var(--cyan);
  font-weight: 700;
}

.video-mark-label-input {
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-md);
  padding: 0 12px;
  background: var(--input-bg);
  color: var(--text-main);
}

.app-footer {
  padding-top: 4px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.footer-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--orange);
  font-weight: 700;
  text-decoration: none;
}

.footer-link:hover,
.footer-link:focus-visible {
  text-decoration: underline;
}

.mode-pill:focus-visible,
.fps-chip:focus-visible,
.settings-chip:focus-visible,
.action-button:focus-visible,
.video-icon-button:focus-visible,
.capture-delete:focus-visible,
.video-mark-jump:focus-visible,
.video-mark-delete:focus-visible,
.video-timeline:focus-visible,
.video-timeline-marker:focus-visible,
.stopwatch-button:focus-visible,
.field-group input:focus-visible,
.video-mark-label-input:focus-visible,
.collapsible-head:focus-visible {
  outline: 3px solid rgba(103, 232, 249, 0.22);
  outline-offset: 2px;
}

.is-hidden {
  display: none !important;
}

@keyframes value-pop {
  0% {
    transform: scale(1);
    color: var(--cyan);
  }
  42% {
    transform: scale(1.045);
    color: #b8f7ff;
  }
  100% {
    transform: scale(1);
    color: var(--cyan);
  }
}

@media (min-width: 720px) {
  .app-shell {
    padding-inline: 24px;
  }

  .hero-panel {
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
    align-items: center;
  }

  .dial-context {
    min-height: 50px;
  }

  .secondary-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: start;
  }

  .desktop-only {
    display: grid;
  }

  .converter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .help-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .video-url-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .video-url-actions {
    grid-auto-flow: column;
    align-items: center;
  }

  .video-marks-head {
    grid-template-columns: auto 1fr;
  }

  .video-marks-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
