:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1c1f24;
  --muted: #5a616b;
  --line: #d5d9df;
  --accent: #1f5fd1;
  --accent-text: #ffffff;
  --error: #b3261e;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
}

h1 { font-size: 1.4rem; margin: 8px 0 16px; }
h2 { font-size: 1rem; margin: 0 0 8px; color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.hint { margin: 0 0 12px; color: var(--muted); font-size: 0.9rem; }

.btn {
  min-height: 48px;
  min-width: 48px;
  padding: 0 16px;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  touch-action: manipulation;
}
.btn:focus-visible, input[type="range"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}
.btn-play { width: 100%; min-height: 56px; font-size: 1.2rem; }

.filename { margin: 12px 0 0; word-break: break-all; font-weight: 600; }
.error { margin: 8px 0 0; color: var(--error); font-weight: 600; min-height: 1.6em; }

.seek { margin-top: 12px; }
input[type="range"] { width: 100%; height: 44px; margin: 0; accent-color: var(--accent); touch-action: pan-y; }
.times { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; color: var(--muted); }

.remain { margin: 4px 0 0; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

.speed-label { margin: 0; font-size: 2rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }

.presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 8px; }
.preset { padding: 0; min-width: 0; }
.preset[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

.dropveil {
  display: none;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: rgba(31, 95, 209, 0.85);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  pointer-events: none;
}
body.dragging .dropveil { display: flex; }
