:root {
  --bg-base: #121417;
  --bg-surface: #1C1F24;
  --bg-elevated: #262A31;
  --border-subtle: #2C313A;
  --text-primary: #E8EAED;
  --text-secondary: #9AA0A8;
  --text-muted: #646B75;
  --accent-primary: #D8A458;
  --accent-pressed: #BE8B42;
  --accent-tint: rgba(216, 164, 88, 0.14);
  --status-completed: #63A382;
  --font-sans: "Noto Sans JP", "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
  --text-xl: 1.25rem;
  --text-md: 1rem;
  --text-sm: 0.8125rem;
  --text-xs: 0.75rem;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --mini-player-height: 72px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --z-header: 10;
  --z-mini-player: 20;
  --z-player-sheet: 30;
}
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background-color: var(--bg-base); color: var(--text-primary); font-family: var(--font-sans); font-size: var(--text-md); line-height: 1.5; -webkit-font-smoothing: antialiased; touch-action: manipulation; }
button { appearance: none; border: none; background: none; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.app-header { position: sticky; top: 0; z-index: var(--z-header); background-color: rgba(18,20,23,0.92); backdrop-filter: blur(12px); padding: var(--space-4) var(--space-4) var(--space-3); border-bottom: 1px solid var(--border-subtle); }
.app-header__top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--space-3); }
.app-header__title { margin: 0; font-size: var(--text-xl); font-weight: 700; letter-spacing: 0.02em; }
.app-header__summary { font-size: var(--text-xs); color: var(--text-secondary); }
.filter-tabs { display: flex; gap: var(--space-2); }
.filter-tab { min-height: 36px; padding: 0 var(--space-4); border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: 500; color: var(--text-secondary); background-color: var(--bg-surface); transition: background-color 0.15s, color 0.15s; }
.filter-tab.is-active { color: var(--accent-primary); background-color: var(--accent-tint); }
.episode-list { list-style: none; margin: 0; padding: 0 0 calc(var(--mini-player-height) + var(--safe-bottom) + var(--space-6)); }
.episode-card { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); border-bottom: 1px solid var(--border-subtle); transition: background-color 0.15s; }
.episode-card:active { background-color: var(--bg-elevated); }
.episode-card.is-playing { background-color: var(--accent-tint); }
.episode-card__body { flex: 1; min-width: 0; }
.episode-card__meta { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--text-secondary); margin-bottom: var(--space-1); }
.unplayed-dot { width: 6px; height: 6px; border-radius: var(--radius-full); background-color: var(--accent-primary); flex-shrink: 0; }
.episode-card__title { margin: 0 0 var(--space-2); font-size: var(--text-md); font-weight: 600; line-height: 1.45; color: var(--text-primary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.episode-card.is-played .episode-card__title { color: var(--text-muted); font-weight: 500; }
.episode-card__status { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-sm); color: var(--text-secondary); }
.episode-card__status--remaining { color: var(--accent-primary); font-weight: 500; }
.episode-card__status--played { color: var(--text-muted); }
.episode-card__status--played .icon-check { color: var(--status-completed); margin-right: 4px; }
.progress-bar { flex: 1; max-width: 120px; height: 3px; background-color: var(--bg-elevated); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar__fill { height: 100%; background-color: var(--accent-primary); border-radius: var(--radius-full); }
.episode-card__play-btn { width: 48px; height: 48px; flex-shrink: 0; border-radius: var(--radius-full); display: grid; place-items: center; background-color: var(--bg-surface); border: 1px solid var(--border-subtle); color: var(--text-primary); }
.episode-card.is-playing .episode-card__play-btn { background-color: var(--accent-primary); border-color: var(--accent-primary); color: var(--bg-base); }
.mini-player { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-mini-player); background-color: var(--bg-surface); border-top: 1px solid var(--border-subtle); padding-bottom: var(--safe-bottom); box-shadow: 0 -4px 20px rgba(0,0,0,0.4); }
.mini-player__progress { width: 100%; height: 2px; background-color: var(--bg-elevated); }
.mini-player__progress-fill { height: 100%; background-color: var(--accent-primary); }
.mini-player__inner { height: var(--mini-player-height); padding: 0 var(--space-3) 0 var(--space-4); display: flex; align-items: center; gap: var(--space-3); }
.mini-player__info { flex: 1; min-width: 0; }
.mini-player__title { font-size: var(--text-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-player__meta { font-size: var(--text-xs); color: var(--text-secondary); }
.mini-player__actions { display: flex; align-items: center; gap: var(--space-1); }
.icon-btn { width: 48px; height: 48px; border-radius: var(--radius-full); display: grid; place-items: center; color: var(--text-primary); }
.icon-btn:active { background-color: var(--bg-elevated); }
.player-sheet { position: fixed; inset: 0; z-index: var(--z-player-sheet); background-color: var(--bg-base); display: flex; flex-direction: column; padding: var(--space-3) var(--space-6) calc(var(--space-6) + var(--safe-bottom)); }
.player-sheet__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.player-sheet__handle { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 36px; height: 4px; border-radius: var(--radius-full); background-color: var(--border-subtle); }
.player-sheet__info { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding-bottom: var(--space-6); }
.player-sheet__artwork { width: 168px; height: 168px; border-radius: var(--radius-md); background-color: var(--bg-surface); border: 1px solid var(--border-subtle); margin-bottom: var(--space-6); object-fit: cover; }
.player-sheet__title { margin: 0 0 var(--space-2); font-size: var(--text-xl); font-weight: 700; line-height: 1.45; color: var(--text-primary); }
.player-sheet__meta { font-size: var(--text-sm); color: var(--text-secondary); }
.player-sheet__controls { display: flex; flex-direction: column; gap: var(--space-6); }
.seek-group { width: 100%; }
.seek-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; cursor: pointer; }
.seek-slider::-webkit-slider-runnable-track { height: 4px; border-radius: var(--radius-full); background: var(--bg-elevated); }
.seek-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: var(--radius-full); background: var(--accent-primary); margin-top: -6px; box-shadow: 0 0 0 4px rgba(216,164,88,0.2); }
.seek-times { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--text-secondary); margin-top: -6px; }
.main-controls { display: flex; align-items: center; justify-content: center; gap: var(--space-8); }
.skip-btn { width: 56px; height: 56px; border-radius: var(--radius-full); display: grid; place-items: center; font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); }
.skip-btn:active { background-color: var(--bg-elevated); }
.play-btn-lg { width: 72px; height: 72px; border-radius: var(--radius-full); display: grid; place-items: center; background-color: var(--accent-primary); color: var(--bg-base); transition: transform 0.1s, background-color 0.15s; }
.play-btn-lg:active { background-color: var(--accent-pressed); transform: scale(0.95); }
.sub-controls { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-4); }
.sub-btn { min-width: 96px; height: 44px; padding: 0 var(--space-4); border-radius: var(--radius-full); background-color: var(--bg-surface); color: var(--text-secondary); font-size: var(--text-sm); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); }
.sub-btn.is-active { color: var(--accent-primary); background-color: var(--accent-tint); }
