/* Theme and design tokens */
:root {
  color-scheme: light;
  --serif: 'Noto Serif KR', Batang, serif;
  --sans: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  font-family: var(--sans);
  font-synthesis: none;
  --text: #243a36;
  --muted: #59675e;
  --line: #cbd3c8;
  --paper: #f7f8f4;
  --surface: #fff;
  --surface-subtle: #edf1e9;
  --accent: #a33f2d;
  --accent-soft: #f8eae4;
  --on-accent: #fff;
  --primary-bg: #243a36;
  --primary-text: #f7f8f1;
  --ink: var(--text);
  --focus: #a33f2d;
  --player-bg: #203a36;
  --player-surface: #294740;
  --player-text: #f6f8ef;
  --player-muted: #cedacd;
  --player-border: #789184;
  --player-accent: #f1ae93;
  --player-emphasis: #e0e5c2;
  --player-on-emphasis: #22382d;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --radius-sm: 5px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow: 0 12px 30px #203a360b;
}

[data-theme="dark"] {
  --ink: var(--text);
  color-scheme: dark;
  --text: #ecf1e7;
  --muted: #b8c7ba;
  --line: #42534a;
  --paper: #151c19;
  --surface: #1e2a24;
  --surface-subtle: #2b3b31;
  --accent: #f3ac96;
  --accent-soft: #3c2824;
  --on-accent: #231d17;
  --primary-bg: #cfe0bd;
  --primary-text: #203326;
  --focus: #f3ac96;
  --player-bg: #172b23;
  --player-outline: #3d5c4d;
  --player-surface: #20362b;
  --player-text: #f3f7e9;
  --player-muted: #cfddd0;
  --player-border: #799282;
  --player-emphasis: #dfebbf;
  --shadow: 0 12px 30px #0003;
}

/* Base, focus and accessibility */
* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  outline-offset: 5px;
  color: inherit;
  touch-action: manipulation;
}

input {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  outline-offset: 5px;
}

a {
  -webkit-tap-highlight-color: transparent;
  color: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

svg {
  width: 24px;
  height: 24px;
}

input[type=number] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

[hidden] {
  display: none!important;
}

html {
  min-width: 280px;
  background: var(--paper);
}

select {
  font: inherit;
  color: inherit;
  outline-offset: 4px;
}

textarea {
  font: inherit;
  color: inherit;
  outline-offset: 4px;
}

select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

input[type=range] {
  min-height: 44px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Page, navigation and display settings */
.site-header {
  height: 102px;
  max-width: 1440px;
  margin: auto;
  padding: 0 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: var(--space-4);
}

.brand {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark {
  font-family: var(--serif);
  background: var(--accent);
  width: 44px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 30px;
  border-radius: 2px;
  color: var(--on-accent);
}

.brand-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .04em;
}

.brand-name small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .18em;
  margin-top: 5px;
}

.header-note {
  display: flex;
  gap: 15px;
  align-items: center;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--muted);
}

.small-line {
  height: 1px;
  width: 25px;
  background: var(--muted);
}

.text-button {
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  border: 0;
  font-size: 14px;
  padding: 12px 0;
}

.text-button span {
  margin-left: 10px;
}

main {
  max-width: 1240px;
  padding: 46px 48px 0;
  margin: auto;
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: var(--space-4);
}

.practice-intro {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  margin: -12px 0 12px;
  max-width: 780px;
}
.rhythm-guide-links, .guide-shortcuts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  font-size: 13px;
}
.rhythm-guide-links { margin: 0 0 24px; }
.rhythm-guide-links > span { color: var(--muted); }
.rhythm-guide-links a, .guide-shortcuts a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  padding-inline: 4px;
  margin-inline: -4px;
  color: var(--ink);
  text-underline-offset: 4px;
}
.rhythm-guide-links a[aria-current="page"] { font-weight: 700; }
.guide-shortcuts { margin-bottom: 4px; }
.rhythm-guide {
  margin: 32px 0 16px;
  padding: 24px clamp(16px, 4vw, 32px);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.9;
}
.rhythm-guide h2 { font-size: 22px; line-height: 1.5; margin: 0 0 14px; }
.rhythm-guide h3 { font-size: 17px; margin: 26px 0 10px; }
.rhythm-guide p { max-width: 850px; }
.rhythm-guide ol { padding-left: 22px; }
.rhythm-guide li + li { margin-top: 10px; }
.rhythm-guide a { color: var(--ink); text-underline-offset: 4px; }
.guide-pattern { border-collapse: collapse; width: 100%; max-width: 440px; }
.guide-pattern caption { text-align: left; color: var(--muted); margin: 0 0 8px; font-size: 12px; }
.guide-pattern th, .guide-pattern td { border-bottom: 1px solid var(--line); text-align: left; padding: 8px 12px; }
.guide-pattern td { white-space: pre; letter-spacing: .12em; }
.guide-source { color: var(--muted); font-size: 12px; }
.guide-action { display: inline-flex; align-items: center; min-height: 44px; }

/* 국악 장단 hub page (/jangdan/) */
.jangdan-page .site-header .text-button { text-decoration: none; color: var(--ink); }
.jangdan-table-scroll { overflow-x: auto; margin: 18px 0 8px; }
.jangdan-table-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.jangdan-compare { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 14px; }
.jangdan-compare caption { text-align: left; color: var(--muted); margin: 0 0 8px; font-size: 12px; }
.jangdan-compare th, .jangdan-compare td { border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; padding: 10px 12px; }
.jangdan-compare thead th { color: var(--muted); font-weight: 500; font-size: 13px; }
.jangdan-compare tbody th { font-family: var(--serif); font-size: 16px; white-space: nowrap; }
.jangdan-compare td { white-space: nowrap; }
/* Use the cell's existing padding as the link hit area; preserve text spacing. */
.jangdan-compare tbody th a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; margin-block: -10px; }
.jangdan-compare small { color: var(--muted); font-size: 12px; }
.jangdan-gueum { letter-spacing: .08em; }
.jangdan-gueum span { color: var(--muted); padding: 0 4px; }
.jangdan-legend { list-style: none; padding: 0; display: grid; gap: 6px; }
.jangdan-legend b { display: inline-block; min-width: 28px; font-family: var(--serif); font-size: 16px; }
.jangdan-section { margin: 36px 0 16px; }
.jangdan-section > h2 { font-size: 22px; line-height: 1.5; margin: 0 0 16px; }
.jangdan-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.jangdan-cards li { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 18px 20px; font-size: 14px; line-height: 1.8; }
.jangdan-cards h3 { font-size: 18px; margin: 0 0 6px; }
.jangdan-cards p { margin: 0 0 10px; }
.jangdan-card-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.jangdan-card-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-underline-offset: 4px; }
.jangdan-faq { font-size: 14px; line-height: 1.8; }
.jangdan-faq dt { font-weight: 700; margin-top: 16px; }
.jangdan-faq dd { margin: 4px 0 0; color: var(--text); }
.jangdan-section .guide-action { color: var(--ink); text-underline-offset: 4px; }
#rhythm-guide, #player-title { scroll-margin-top: 24px; }

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 0 0 10px;
}

/* .page-title: tab headings styled like the page h1 so each page keeps a single h1. */
h1, .page-title {
  font-family: var(--serif);
  font-size: 38px;
  letter-spacing: -.05em;
  line-height: 1.5;
  margin: 0;
  font-weight: 600;
}

.edition {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--muted);
  display: flex;
  gap: 13px;
  align-items: center;
}

.edition span {
  font-family: var(--sans);
  font-size: 12px;
  border-left: 1px solid var(--line);
  padding-left: 13px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0,1.25fr) minmax(350px,1fr);
  gap: 44px;
  align-items: start;
}

.app-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.app-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 13px 18px;
  color: var(--muted);
  font-size: 15px;
}

.app-tabs button[aria-selected="true"] {
  border-bottom-color: var(--accent);
  color: var(--ink);
  font-weight: 700;
}

.workspace>* {
  min-width: 0;
}

.display-settings {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.theme-setting {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 12px;
  color: var(--muted);
}

.theme-button {
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}

.theme-button svg {
  width: 22px;
  height: 22px;
}

.theme-button[aria-pressed="true"] {
  background: var(--primary-bg);
  border-color: var(--primary-bg);
  color: var(--primary-text);
}

/* Sequence configuration */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.section-heading>div {
  display: flex;
  align-items: center;
}

.section-no {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--accent);
  margin-right: 12px;
}

/* Section numbers follow the visual order: the player is stacked first on narrow screens. */
.num-narrow {
  display: none;
}

.section-heading h2 {
  font-size: 18px;
  letter-spacing: -.03em;
  margin: 0;
  font-weight: 600;
}

.muted {
  font-size: 12px;
  color: var(--muted);
}

.section-description {
  color: var(--muted);
  margin: 13px 0 26px;
  font-size: 14px;
}

.table-labels {
  display: grid;
  padding: 0 18px 11px;
  color: var(--muted);
  font-size: 13px;
  grid-template-columns: minmax(0,1fr) 86px 134px;
  gap: var(--space-3);
}

.table-labels>span:not(:first-child) {
  text-align: center;
}

.sequence {
  border-top: 1px solid var(--ink);
}

.sequence-row {
  display: grid;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  transition: background .2s;
  grid-template-columns: minmax(0,1fr) 86px 134px;
  gap: var(--space-3);
}

.sequence-row.selected {
  background: var(--surface-subtle);
  box-shadow: inset 3px 0 0 var(--ink);
}

.sequence-row.excluded {
  /* No opacity: dimmed text failed WCAG AA (2.3–3.2:1). --muted stays >= 5.2:1 on every row background in both themes. */
  box-shadow: inset 3px 0 0 var(--line);
}
.sequence-row.excluded .row-title,
.sequence-row.excluded .row-title strong,
.sequence-row.excluded .row-title small,
.sequence-row.excluded .row-number,
.sequence-row.excluded .bpm-control span,
.sequence-row.excluded .row-duration {
  color: var(--muted);
}
.sequence-row.excluded .row-title strong { font-weight: 500; }
.sequence-row.excluded .row-title small::after { content: ' · 0회 제외'; }
.sequence-row.excluded.selected { box-shadow: inset 3px 0 0 var(--ink); }

.row-title {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 44px;
  width: 100%;
}

.row-number {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.row-title strong {
  font-family: var(--serif);
  font-weight: 600;
  display: block;
  font-size: 18px;
  white-space: nowrap;
}

.row-title small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  font-size: 11px;
}

.bpm-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.bpm-control input {
  width: 51px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: center;
  color: var(--ink);
  padding: 6px 0;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  min-height: 44px;
}

.bpm-control span {
  font-size: 10px;
  color: var(--muted);
}

.stepper {
  min-width: 134px; /* Three 44px targets plus the two 1px borders. */
  display: flex;
  border: 1px solid var(--line);
  overflow: hidden;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.stepper button {
  border: 0;
  background: transparent;
  font-size: 18px;
  flex-shrink: 0;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
}

.stepper button:hover {
  background: var(--surface-subtle);
}

.stepper input {
  width: 100%;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 15px;
  color: var(--ink);
  padding: 0;
}

.sequence-summary {
  display: flex;
  justify-content: space-between;
  padding: 19px 0;
  font-size: 13px;
  color: var(--muted);
  gap: var(--space-2);
  flex-wrap: wrap;
}

.sequence-summary strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  margin: 0 5px;
  font-variant-numeric: tabular-nums;
}

.transition-card {
  margin-top: 13px;
  padding: 20px 18px;
  border: 1px solid var(--line);
  display: flex;
  gap: 15px;
  align-items: center;
  border-radius: 6px;
}

.transition-symbol {
  color: var(--accent);
  font-size: 28px;
  align-self: flex-start;
  line-height: 1.3;
}

.transition-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 7px;
}

.transition-card p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.9;
}

.transition-card strong {
  font-weight: 500;
  color: var(--ink);
}

.ratio {
  font-family: var(--serif);
  font-size: 34px;
  color: var(--accent);
  margin-left: auto;
  white-space: nowrap;
}

.ratio span {
  font-size: 17px;
}

.fine-print {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin: 10px 0 0;
}

.transition-content {
  flex: 1;
  min-width: 0;
}

.transition-control {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 7px 12px;
  margin-top: 12px;
}

.transition-control label {
  grid-column: 1/-1;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.transition-control input {
  width: 100%;
  min-width: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.transition-control input:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.transition-limits {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.transition-card .ratio {
  align-self: center;
}

.transition-control input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.row-duration {
  grid-column: 1/-1;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  margin-top: -5px;
  font-variant-numeric: tabular-nums;
}

.row-duration>span {
  color: var(--ink);
}

.row-name {
  min-width: 0;
}

/* Player, transport and session progress */
.player-panel {
  padding: 25px 30px 21px;
  background: var(--player-bg);
  color: var(--player-text);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  --ink: var(--player-text);
  --muted: var(--player-muted);
  --line: var(--player-border);
  --paper: var(--player-surface);
  --surface: var(--player-surface);
  --surface-subtle: var(--player-surface);
  --accent: var(--player-accent);
  --focus: var(--player-emphasis);
}

/* Dark page and dark player are close in tone: outline the card so it stays distinct. */
[data-theme="dark"] .player-panel {
  box-shadow: 0 0 0 1px var(--player-outline), var(--shadow);
}

.player-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.player-label {
  letter-spacing: .04em;
  font-size: 13px;
  color: var(--player-muted);
}

.status {
  border: 1px solid #ffffff26;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--player-text);
  background: var(--player-surface);
  border-color: var(--player-border);
}

.status.slowing {
  background: #a33f2d;
  color: #fff;
  border-color: #f1ae93;
}

.player-title {
  text-align: center;
  margin: 25px 0 0;
}

.player-title h2 {
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 500;
  margin: 0 0 8px;
}

.player-title p {
  font-size: 12px;
  margin: 0;
  color: var(--player-muted);
}

.rhythm-orbit {
  width: 270px;
  height: 270px;
  position: relative;
  margin: 6px auto 0;
  max-width: 100%;
}

.orbit-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.orbit-track circle {
  fill: none;
  stroke: #ffffff20;
  stroke-width: 1;
}

.orbit-track .orbit-progress {
  stroke-width: 2;
  stroke-dasharray: 703.716;
  stroke-dashoffset: 703.716;
  transition: stroke-dashoffset .1s;
  stroke: var(--player-emphasis);
}

.beat-marker {
  position: absolute;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transform: translate(-50%,-50%);
  font-size: 12px;
  border: 1px solid #6c8277;
  background: var(--player-bg);
  color: var(--player-muted);
  border-color: var(--player-border);
}

.beat-marker.active {
  box-shadow: 0 0 0 5px #e0e5c20d;
  background: var(--player-emphasis);
  color: var(--player-on-emphasis);
  border-color: var(--player-emphasis);
}

.orbit-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.current-stroke {
  font-family: var(--serif);
  font-size: 58px;
  line-height: 1.55;
  font-weight: 500;
}

#beat-position {
  font-size: 12px;
  margin-top: 4px;
  color: var(--player-muted);
}

.orbit-caption {
  letter-spacing: .14em;
  margin-top: 13px;
  color: var(--player-muted);
  font-size: 11px;
}

.player-metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin: 0 0 24px;
}

.player-metrics>div {
  min-width: 98px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.player-metrics>div>span {
  font-size: 11px;
  color: var(--player-muted);
}

.player-metrics strong {
  font-size: 28px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.player-metrics small {
  font-size: 13px;
  font-weight: 400;
  color: var(--player-muted);
}

.metric-divider {
  height: 34px;
  width: 1px;
  background: #ffffff20;
}

.transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.icon-button {
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: inherit;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}

.transport .icon-button {
  border-color: var(--player-border);
}

.play-button {
  min-width: 176px;
  border: 0;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  background: var(--player-emphasis);
  color: var(--player-on-emphasis);
  min-height: 50px;
}

.play-button:hover {
  background: #f0f3d8;
}

.play-button:active {
  transform: translateY(1px);
}

#play-icon {
  font-size: 13px;
}

.key-hint {
  font-size: 9px;
  letter-spacing: .06em;
  border: 1px solid #6c8277;
  padding: 4px;
  border-radius: 3px;
  color: var(--player-muted);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 13px;
  max-width: 255px;
  margin: 8px auto;
  font-size: 13px;
  color: var(--player-muted);
}

.volume-control input {
  width: 100%;
  height: 44px;
  accent-color: #d9dfbc;
  cursor: pointer;
  min-height: 44px;
}

.volume-control label {
  flex-shrink: 0;
}

.volume-control output {
  flex-shrink: 0;
  width: 29px;
  font-variant-numeric: tabular-nums;
}

.next-up {
  border-top: 1px solid #ffffff20;
  padding-top: 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--player-muted);
  border-color: var(--player-border);
}

.next-up strong {
  font-size: 14px;
  font-weight: 500;
  color: var(--player-text);
}

.next-up>span:last-child {
  margin-left: auto;
}

.audio-note {
  text-align: center;
  margin: 17px 0 0;
  font-size: 12px;
  color: var(--player-muted);
}

.bpm-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.bpm-btn {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  background: transparent;
  border: 1px solid #738477;
  border-radius: 4px;
  display: grid;
  place-items: center;
  line-height: 1;
  padding: 0;
  width: 44px;
  height: 44px;
  font-size: 20px;
  flex: 0 0 44px;
  color: var(--player-text);
  border-color: var(--player-border);
}

.bpm-btn:hover {
  background: var(--player-surface);
  color: var(--player-text);
}

.bpm-btn:active {
  transform: translateY(1px);
}

#tempo-pending:empty {
  display: none;
}

#transition-cue {
  min-height: 1.5em;
  color: var(--player-text);
}

.bpm-stepper strong {
  white-space: nowrap;
}

.player-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--player-border);
  font-size: 12px;
  color: var(--player-muted);
}

.player-options label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  cursor: pointer;
}

.player-options input[type=checkbox] {
  width: 20px;
  height: 20px;
  accent-color: var(--player-emphasis);
  flex-shrink: 0;
}

.view-switch {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-1);
  margin: 16px auto 4px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--player-border);
  border-radius: var(--radius-sm);
}

.view-switch button {
  min-height: 44px;
  padding: 8px 16px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--player-muted);
  font-size: 13px;
}

.view-switch button[aria-pressed="true"] {
  background: var(--player-emphasis);
  color: var(--player-on-emphasis);
  font-weight: 600;
}

.session-progress-block {
  --player-surface: var(--surface-subtle);
  --player-border: var(--line);
  --player-muted: var(--muted);
  --player-emphasis: var(--primary-bg);
  --player-on-emphasis: var(--primary-text);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.session-progress-block>label {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  color: var(--player-muted);
  font-size: 12px;
}

.session-progress-block #session-progress-text {
  margin: 0;
}

#session-progress {
  display: block;
  width: 100%;
  height: 7px;
  margin-top: var(--space-2);
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  appearance: none;
  background: var(--player-surface);
  accent-color: var(--player-emphasis);
}

#session-progress::-webkit-progress-bar {
  background: var(--player-surface);
  border-radius: 8px;
}

#session-progress::-webkit-progress-value {
  background: var(--player-emphasis);
  border-radius: 8px;
}

#session-progress::-moz-progress-bar {
  background: var(--player-emphasis);
  border-radius: 8px;
}

#session-progress-text {
  display: block;
  margin: 8px 0 0;
  color: var(--player-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.session-timeline {
  display: flex;
  gap: 3px;
  width: 100%;
  margin: 12px 0 0;
  min-height: 27px;
}

.timeline-segment {
  flex-basis: 0;
  min-width: 0;
  padding: 5px 2px;
  border-radius: 3px;
  background: var(--player-surface);
  border: 1px solid var(--player-border);
  color: var(--player-muted);
  text-align: center;
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-segment.active {
  background: var(--player-emphasis);
  color: var(--player-on-emphasis);
  border-color: var(--player-emphasis);
  font-weight: 700;
}

.timeline-segment.completed {
  background: #496554;
  color: #f6f8ef;
}

.session-timeline.timeline-compact {
  gap: 0;
  min-height: 10px;
}

.timeline-compact .timeline-segment {
  font-size: 0;
  min-height: 10px;
  padding: 0;
  border-width: 0;
}

#player-notation-slot {
  min-width: 0;
}

#player-notation-slot .notation-panel {
  margin: 16px 0 20px;
  padding-top: 16px;
}

#player-notation-slot .notation-heading {
  align-items: flex-start;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

#player-notation-slot .notation-heading h2 {
  font-size: 16px;
}

#player-notation-slot #notation-name {
  margin-left: 10px;
  padding-left: 10px;
  font-size: 12px;
}

#player-notation-slot .notation {
  grid-template-columns: repeat(4,minmax(0,1fr)) !important;
  gap: 5px;
}

#player-notation-slot .notation[data-beats="6"] {
  grid-template-columns: repeat(3,minmax(0,1fr)) !important;
}

#player-notation-slot .notation-cell {
  font-size: 15px;
  padding: 12px 0;
}

#player-notation-slot .notation-cell.active {
  background: var(--player-emphasis);
  color: var(--player-on-emphasis);
}

#player-notation-slot .notation-cell.slowing {
  background: var(--player-accent);
  color: var(--player-on-emphasis);
}

#player-notation-slot .notation-legend {
  line-height: 1.9;
  word-spacing: 0;
}

#player-notation-slot .notation-legend b:first-child {
  margin-left: 0;
}

/* Rhythm notation */
.notation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.notation-heading>div {
  display: flex;
  align-items: center;
  gap: 0;
}

.notation-heading h2 {
  font-size: 18px;
  letter-spacing: -.03em;
  margin: 0;
  font-weight: 600;
}

.notation-panel {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding-top: 26px;
}

#notation-name {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--muted);
  margin-left: 17px;
  padding-left: 17px;
  border-left: 1px solid var(--line);
}

.notation-legend {
  font-size: 11px;
  color: var(--muted);
  word-spacing: 4px;
}

.notation-legend b {
  font-family: var(--serif);
  color: var(--ink);
  font-size: 14px;
  margin-left: 12px;
}

.notation {
  display: grid;
  gap: 8px;
}

.notation-beat {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  min-width: 0;
  background: var(--surface);
}

.notation-beat>span {
  font-size: 10px;
  color: var(--muted);
  display: block;
  text-align: center;
  padding: 7px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
}

.notation-subdivisions {
  display: grid;
  grid-template-columns: repeat(var(--subdivisions),1fr);
}

.notation-cell {
  font-family: var(--serif);
  font-size: 18px;
  text-align: center;
  padding: 14px 0;
  border-right: 1px solid var(--line);
  transition: background .1s;
}

.notation-cell:last-child {
  border: 0;
}

.notation-cell.active {
  background: var(--primary-bg);
  color: var(--primary-text);
}

.notation-cell.slowing {
  background: var(--accent);
  color: var(--on-accent);
}

.notation-cell.accented {
  position: relative;
  font-weight: 700;
}

.notation-cell.accented::before {
  content: '>';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font: 600 12px var(--sans);
}

/* Saved practice, logs and weekly chart */
.practice-tools-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.practice-tools-grid>.practice-tools {
  min-width: 0;
  margin-bottom: 0;
}

.practice-tools-grid>.practice-tools>summary {
  min-height: 48px;
  padding: 12px 14px;
  font-size: 14px;
}

.practice-tools {
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 24px;
  border-radius: var(--radius-md);
}

.practice-tools>summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  min-height: 52px;
}

.practice-tools-body {
  padding: 0 22px 20px;
}

.practice-tools h2 {
  font-size: 16px;
  margin: 6px 0 16px;
}

.practice-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.practice-fields label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  flex: 1;
  min-width: min(130px,100%);
}

.practice-tools input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  padding: 10px;
  font: inherit;
  min-height: 44px;
}

.practice-tools select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  padding: 10px;
  font: inherit;
  min-height: 44px;
}

.practice-tools input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.practice-tools select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.practice-tools button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.practice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.practice-actions button {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  padding: 11px 14px;
  font-size: 13px;
  min-height: 44px;
}

.practice-actions button:first-child {
  background: var(--primary-bg);
  color: var(--primary-text);
}

.practice-tools :disabled {
  opacity: .5;
  cursor: not-allowed;
}

.preset-editor {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 16px;
}

.practice-tools .preset-editor {
  font-size: 12px;
}

.practice-tools .preset-editor h2 {
  font-size: 14px;
  margin-bottom: 12px;
}

.practice-tools .preset-editor input,
.practice-tools .preset-editor select {
  font-size: 14px;
}

.preset-editor .practice-actions button {
  font-size: 12px;
}

.preset-saved {
  margin-top: 14px;
}

.preset-saved>label {
  flex: 2;
}

.preset-saved .practice-actions {
  flex: 3;
}

#share-result {
  margin-top: 15px;
  font-size: 12px;
}

#share-link {
  flex: 1;
  min-width: 160px;
}

#preset-message {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 0;
}

.range-error {
  color: var(--accent);
  font-size: 13px;
}

.range-error:empty {
  display: none;
}

.practice-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 13px;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.log-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.log-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.log-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 6px;
}

.log-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.log-summary {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.log-memo {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px;
  font: inherit;
  resize: vertical;
  background: var(--paper);
  box-sizing: border-box;
  color: var(--ink);
  font-size: 14px;
  min-height: 76px;
}

.log-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.log-delete-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
}

.log-delete-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.log-empty {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 20px 0;
}

.log-save-status {
  font-size: 12px;
  line-height: 1.6;
  flex: 1 1 150px;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.log-actions button {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  min-height: 44px;
}

.practice-log-header button {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  min-height: 44px;
}

#backup-message {
  font-size: 13px;
  line-height: 1.6;
}

#weekly-chart {
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
  gap: var(--space-2);
  margin: 20px 0;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
}

.week-day {
  height: 138px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
}

.week-day span {
  max-width: 100%;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.week-bar {
  height: calc(var(--bar-height,0%) * .65);
  min-height: 3px;
  max-height: 90px;
  width: min(28px,70%);
  flex-shrink: 0;
  border-radius: 4px 4px 0 0;
  background: var(--primary-bg);
}

.week-day.today {
  color: var(--ink);
  font-weight: 700;
}

.week-day.today .week-bar {
  background: var(--accent);
}

/* Video gallery */
.video-list {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 20px;
}

.video-card {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
}

.video-card h2 {
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.5;
  margin: 0;
}

.video-performer {
  font-size: 14px;
  margin: 10px 0;
  color: var(--muted);
}

.video-description {
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-line;
}

.video-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 22px;
}

.video-play {
  border: 0;
  border-radius: 5px;
  padding: 13px 17px;
  font-size: 14px;
  background: var(--primary-bg);
  color: var(--primary-text);
}

.video-actions a {
  text-underline-offset: 4px;
  font-size: 13px;
}

.video-player-area a {
  text-underline-offset: 4px;
  font-size: 13px;
}

.video-policy a {
  text-underline-offset: 4px;
  font-size: 13px;
}

.video-empty {
  padding: 48px 24px;
  border: 1px dashed var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.video-player-area {
  margin-bottom: 28px;
}

.video-player-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.video-player-heading h2 {
  font-family: var(--serif);
  font-size: 23px;
  overflow-wrap: anywhere;
}

.video-player-heading button {
  flex-shrink: 0;
}

.video-embed {
  background: #172521;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/9;
  min-height: 200px;
}

.video-embed iframe {
  border: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.video-policy {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}

.video-policy summary {
  cursor: pointer;
  color: var(--ink);
}

/* Feedback, help and footer */

.message {
  padding: 12px 15px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  font-size: 14px;
}

footer {
  max-width: 1144px;
  margin: 34px auto 0;
  padding: 24px 0 30px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  flex-wrap: wrap;
}

footer strong {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--ink);
}

.footer-dot {
  margin: 0 8px;
}

dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: 540px;
  width: calc(100% - 32px);
  padding: 28px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 20px 80px #0003;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}

dialog::backdrop {
  background: #14231f99;
  backdrop-filter: blur(4px);
}

.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dialog-heading h2 {
  font-family: var(--serif);
  font-size: 24px;
  margin: 0;
}

.dialog-heading .icon-button {
  font-size: 25px;
  border-color: var(--line);
}

dialog ol {
  padding-left: 24px;
  font-size: 14px;
  line-height: 1.9;
}

dialog li {
  margin-bottom: 12px;
}

dialog p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}

.reference-note {
  border-top: 1px solid var(--line);
  padding-top: 15px;
}

.reference-note a {
  text-underline-offset: 4px;
}

.shortcut-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.7;
}

.shortcut-table caption {
  padding-bottom: var(--space-2);
  text-align: left;
  font-size: 14px;
  font-weight: 600;
}

.shortcut-table th,
.shortcut-table td {
  padding: 9px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.shortcut-table th {
  background: var(--surface-subtle);
}

.shortcut-table td:first-child {
  width: 30%;
  font-variant-numeric: tabular-nums;
}

.audio-credits {
  flex: 0 0 100%;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.audio-credits p {
  margin: 4px 0;
}

.audio-credits p:first-child {
  font-weight: 600;
  color: var(--ink);
}

.audio-credits a {
  text-underline-offset: 3px;
}

.error {
  color: var(--accent);
  font-size: 13px;
}

#toast-region {
  position: fixed;
  right: max(16px,env(safe-area-inset-right));
  bottom: max(16px,env(safe-area-inset-bottom));
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: min(400px,calc(100% - 32px));
  max-height: 45vh;
  overflow-y: auto;
  pointer-events: none;
}

.toast {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary-bg);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  pointer-events: auto;
}

.toast.error {
  border-left-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}

/* Responsive layout: wide, compact desktop, tablet, then phone. */
@media(min-width:900px) {
  .practice-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
  }
  .practice-tools-grid>.practice-tools[open] {
    grid-column: 1 / -1;
  }
  .practice-tools-grid>.practice-tools>summary {
    min-height: 54px;
    padding: 14px 16px;
  }
}

@media(min-width:1400px) {
  main {
    padding-top: 56px;
  }
  .workspace {
    gap: 56px;
  }
  .player-panel {
    padding-left: 36px;
    padding-right: 36px;
  }
}

@media(min-width:761px) {
  .site-header {
    height: 80px;
  }
  main {
    padding-top: 28px;
  }
  .page-heading {
    margin-bottom: 24px;
  }
  .player-title {
    margin-top: 18px;
  }
  .rhythm-orbit {
    width: 210px;
    height: 210px;
  }
  .player-metrics {
    margin-bottom: 19px;
  }
  .player-panel {
    padding-top: 22px;
  }
  .current-stroke {
    font-size: 48px;
  }
  .sequence-row {
    padding-top: 12px;
    padding-bottom: 12px;
    grid-template-columns: minmax(0,1fr) 80px 134px;
  }
}

@media(max-width:1050px) {
  main {
    padding: 28px 28px 0;
  }
  .site-header {
    padding: 0 28px;
    height: 88px;
  }
  .workspace {
    gap: 25px;
    grid-template-columns: minmax(0,1.2fr) minmax(310px,1fr);
  }
  .sequence-row {
    grid-template-columns: minmax(0,1fr) 80px 134px;
    gap: 9px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .table-labels {
    grid-template-columns: minmax(0,1fr) 80px 134px;
    gap: 9px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .row-title {
    gap: 8px;
  }
  .row-title strong {
    font-size: 18px;
  }
  .player-panel {
    padding: 22px;
  }
  .section-heading .muted {
    display: none;
  }
  .ratio {
    font-size: 28px;
  }
  .transition-card {
    gap: 10px;
    padding: 16px 12px;
  }
  footer {
    margin-left: 28px;
    margin-right: 28px;
  }
  .notation-cell {
    font-size: 16px;
  }
  .player-metrics {
    flex-wrap: wrap;
    gap: 14px;
  }
  .player-metrics>div {
    width: 100%;
  }
  .player-metrics .metric-divider {
    display: none;
  }
}

@media(max-width:760px) {
  .site-header {
    height: auto;
    min-height: 78px;
    padding: 14px 20px;
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .header-note {
    display: none;
  }
  .edition {
    display: none;
  }
  .brand-mark {
    width: 36px;
    height: 40px;
    font-size: 25px;
  }
  .brand-name {
    font-size: 15px;
  }
  .brand-name small {
    font-size: 9px;
  }
  .text-button {
    font-size: 13px;
  }
  main {
    padding: 28px 20px 0;
  }
  .page-heading {
    margin-bottom: 26px;
  }
  h1, .page-title {
    font-size: 31px;
  }
  .eyebrow {
    font-size: 11px;
  }
  .workspace {
    gap: 28px;
    grid-template-columns: minmax(0,1fr);
  }
  .player-panel {
    grid-row: 1;
    padding: 22px 25px;
  }
  .player-top {
    font-size: 11px;
  }
  .player-title {
    margin-top: 19px;
  }
  .rhythm-orbit {
    width: 240px;
    margin-top: 4px;
    height: auto;
    aspect-ratio: 1;
  }
  .player-metrics {
    margin-bottom: 20px;
  }
  .audio-note {
    margin-top: 14px;
  }
  .sequence-row {
    gap: 9px;
    padding-top: 12px;
    padding-bottom: 12px;
    grid-template-columns: minmax(0,1fr) 80px 134px;
  }
  .table-labels {
    gap: 9px;
    grid-template-columns: minmax(0,1fr) 80px 134px;
  }
  .row-title strong {
    font-size: 18px;
  }
  .sequence-summary {
    padding-bottom: 10px;
  }
  .transition-card {
    margin-top: 10px;
    padding: 18px;
  }
  .notation-panel {
    margin-top: 28px;
  }
  .notation-heading {
    align-items: flex-start;
    gap: 15px;
    flex-direction: column;
  }
  .notation-legend b:first-child {
    margin-left: 0;
  }
  .notation {
    gap: 5px;
  }
  .notation-cell {
    font-size: 17px;
    padding: 12px 0;
  }
  .notation-beat>span {
    font-size: 10px;
    padding: 6px;
  }
  .notation-heading h2 {
    font-size: 17px;
  }
  footer {
    margin: 28px 20px 0;
    font-size: 10px;
    align-items: center;
    gap: 15px;
  }
  .fine-print {
    font-size: 11px;
  }
  .notation[data-beats="12"] {
    grid-template-columns: repeat(6,minmax(0,1fr))!important;
  }
  .app-tabs button {
    padding: 12px 10px;
    font-size: 14px;
  }
  .video-list {
    grid-template-columns: 1fr;
  }
  .video-card {
    padding: 20px;
  }
  .video-player-heading h2 {
    font-size: 20px;
  }
  .row-title {
    padding-left: 0;
    padding-right: 0;
  }
  .next-up {
    flex-wrap: wrap;
  }
  .next-up>span:last-child {
    margin-left: 0;
  }
  .theme-setting {
    margin-left: auto;
  }
  .display-settings {
    gap: 8px;
  }
  .practice-tools input {
    font-size: 16px;
  }
  .practice-tools select {
    font-size: 16px;
  }
  .log-memo {
    font-size: 16px;
  }
}

@media(max-width:600px) {
  .practice-tools-body {
    padding: 0 14px 16px;
  }
  .practice-tools>summary {
    padding: 16px 14px;
    font-size: 14px;
  }
  .practice-fields>label {
    flex-basis: calc(50% - 12px);
  }
  #range-start-fields {
    width: 100%;
  }
  .preset-saved .practice-actions {
    flex-basis: 100%;
  }
  .practice-tools input {
    font-size: 16px;
  }
  .practice-tools select {
    font-size: 16px;
  }
}

@media(max-width:480px) {
  .sequence-row {
    grid-template-columns: minmax(0,1fr) minmax(134px,1fr);
    gap: 4px 14px;
    padding: 10px;
  }
  .row-name {
    grid-column: 1 / -1;
  }
  .row-title {
    gap: 10px;
  }
  .row-title strong {
    font-size: 18px;
  }
  .row-title small {
    font-size: 11px;
    margin-top: 0;
  }
  .table-labels {
    grid-template-columns: minmax(0,1fr) minmax(134px,1fr);
    gap: 14px;
    padding: 0 10px 10px;
  }
  .table-labels>span:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  .row-duration {
    margin-top: 0;
    text-align: right;
  }
  .bpm-control {
    justify-content: center;
  }
  .player-panel {
    padding-left: 16px;
    padding-right: 16px;
  }
  .transport {
    gap: 10px;
  }
  .play-button {
    min-width: 0;
    flex: 1;
    max-width: 210px;
    gap: 8px;
  }
  .key-hint {
    display: none;
  }
  .player-metrics {
    gap: 14px;
  }
  .transition-card {
    flex-wrap: wrap;
  }
  .transition-card .ratio {
    font-size: 26px;
  }
  .week-day {
    font-size: 10px;
  }
  #weekly-chart {
    gap: 4px;
  }
  #player-notation-slot .notation {
    grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  }
}

@media(max-width:380px) {
  .row-number {
    display: none;
  }
  .row-title strong {
    font-size: 17px;
  }
  .transport {
    gap: 10px;
  }
  .play-button {
    min-width: 156px;
  }
  .notation-cell {
    font-size: 14px;
  }
  .player-panel {
    padding-left: 16px;
    padding-right: 16px;
  }
  .key-hint {
    display: none;
  }
  .transition-card {
    padding: 14px;
    gap: 10px;
  }
  .ratio {
    font-size: 25px;
  }
  .transition-card .ratio {
    font-size: 23px;
  }
  .transition-control {
    grid-template-columns: 1fr;
  }
  .transition-limits {
    display: none;
  }
  .row-title small {
    font-size: 12px;
  }
  .practice-tools>summary {
    padding-left: 12px;
    padding-right: 12px;
  }
  .site-header {
    padding-left: 16px;
    padding-right: 16px;
  }
  main {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Narrow screens: retain a sticky transport after the title leaves the viewport.
   Its normal flow protects the title while the card enters the screen. */
@media(max-width:760px) {
  .num-wide {
    display: none;
  }
  .num-narrow {
    display: inline;
  }
  .transport {
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--player-bg);
    box-shadow: 0 -14px 14px -6px var(--player-bg);
  }
  .transport.sticky-ready {
    position: sticky;
    bottom: 0;
    z-index: 2;
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    transition: none!important;
    scroll-behavior: auto!important;
  }
  *::before {
    transition: none!important;
    scroll-behavior: auto!important;
  }
  *::after {
    transition: none!important;
    scroll-behavior: auto!important;
  }
}
/* Wave 2: grouped rhythms, recommended presets, sharing, count-in/drone, streak and cards. */
.sequence-group {
  display: block;
  padding: 10px 14px 6px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}
.recommend-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin: -8px 0 24px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.recommend-label { color: var(--muted); font-size: 13px; font-weight: 700; }
.recommend-list { display: flex; flex-wrap: wrap; gap: var(--space-2); flex: 1 1 320px; min-width: 0; }
.recommend-chip, .video-filter-chip {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
  text-align: left;
}
.recommend-chip:disabled { opacity: .5; cursor: not-allowed; }
.recommend-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.share-trigger {
  min-height: 44px;
  padding: 8px 16px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--primary-bg);
  color: var(--primary-text);
  font-weight: 700;
}
.feedback-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-size: 13px; text-underline-offset: 4px; }
.share-qr { display: flex; justify-content: center; margin: var(--space-3) 0; }
.share-qr svg { width: min(240px, 100%); height: auto; border-radius: var(--radius-sm); }
#share-dialog input { flex: 1 1 180px; min-width: 0; min-height: 44px; }
#share-dialog-copy { min-height: 44px; }
.player-extras {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: var(--space-2);
  font-size: 12px;
  color: var(--player-muted);
}
.player-extras label, .drone-control { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; flex-wrap: wrap; }
.player-extras select, .drone-control button, .finish-card {
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--player-border);
  border-radius: var(--radius-sm);
  background: var(--player-surface);
  color: var(--player-text);
  font-size: 13px;
  max-width: 100%;
}
.drone-control button[aria-pressed="true"] { background: var(--player-emphasis); color: var(--player-on-emphasis); border-color: var(--player-emphasis); }
.finish-card { display: block; width: 100%; margin: var(--space-2) 0; font-weight: 700; background: var(--player-emphasis); color: var(--player-on-emphasis); }
.finish-card[hidden] { display: none; }
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.streak-badge[hidden] { display: none; }
.video-filters { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.video-filter-chip[aria-pressed="true"] { background: var(--primary-bg); color: var(--primary-text); border-color: var(--primary-bg); }
.video-practice {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
}
@media(max-width:480px) {
  .recommend-bar { padding: 10px; }
  .recommend-list { flex-basis: 100%; }
  .recommend-chip { flex: 1 1 100%; }
  .recommend-actions { width: 100%; justify-content: space-between; }
  .player-extras, .drone-control { width: 100%; }
  .drone-control select { flex: 1 1 140px; min-width: 0; }
}
/* ==== 내 연습 / 연습 정리 (Brief B) ==== */
#panel-my > .practice-tools { margin-bottom: 20px; }
#panel-my > .practice-tools > h2 { padding: 20px 22px 0; }
#panel-my .preset-editor { border: 0; padding-top: 0; margin-top: 0; }
#range-controls { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
#range-controls h3 { font-size: 14px; margin: 0 0 12px; }
#range-controls :is(input,select), #preset-save-dialog input {
  min-height: 44px; width: 100%; min-width: 0; padding: 10px;
  border: 1px solid var(--line); border-radius: 5px;
  background: var(--paper); color: var(--ink); font: inherit;
}
#preset-save-dialog { width: min(520px,calc(100% - 32px)); box-sizing: border-box; }
#preset-save-dialog .practice-fields { margin-top: 20px; }
#preset-my-link, #panel-my .practice-actions a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); }
#preset-save-open { min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; }
.playback-options { margin-top: 12px; color: var(--player-text); border-top: 1px solid var(--player-border); }
.playback-options > summary { display: list-item; min-height: 44px; padding: 12px 0; box-sizing: border-box; cursor: pointer; font-size: 13px; }
.playback-options .player-options label { min-height: 44px; display: inline-flex; align-items: center; }
#practice-preset-message:empty { display: none; }
@media (max-width: 480px) {
  #range-controls .practice-fields, #preset-save-dialog .practice-fields { gap: 10px; }
  #preset-save-dialog .practice-fields label { flex-basis: 100%; }
  #panel-my .practice-actions { align-items: stretch; }
  #panel-my .practice-actions button { flex: 1 1 auto; }
  #panel-my #share-link { width: 100%; }
}

/* ==== 배움터 (Brief A) ==== */
/* learning pages */
.learning-page main { max-width: 920px; padding-inline: clamp(16px, 4vw, 48px); }
.learning-page .practice-intro { max-width: 68ch; font-size: 15px; line-height: 1.85; margin: -12px 0 20px; }
.learning-summary { margin: 0 0 18px; padding: 18px 22px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; background: var(--surface); }
.learning-summary h2, .learning-toc h2 { margin: 0 0 8px; font-size: 17px; line-height: 1.5; }
.learning-summary ul { display: grid; gap: 5px; margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.75; }
.learning-toc { margin: 0 0 24px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-subtle); }
.learning-toc ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 2px 18px; margin: 0; padding-left: 22px; }
.learning-toc a { display: flex; align-items: center; min-height: 44px; padding: 5px 0; color: var(--ink); font-size: 14px; line-height: 1.5; text-underline-offset: 3px; }
.learning-page article.rhythm-guide { max-width: none; margin: 0; padding: clamp(18px, 4vw, 32px); font-size: 16px; line-height: 1.9; }
.learning-page .rhythm-guide p { max-width: 68ch; margin: 0 0 14px; }
.learning-page .rhythm-guide > section.learning-section { margin: 0; padding: 22px 0; }
.learning-page .rhythm-guide > section.learning-section + section.learning-section { border-top: 1px solid var(--line); }
.learning-page .rhythm-guide > section.learning-section:first-child { padding-top: 0; }
.learning-page .rhythm-guide > section.learning-section:last-child { padding-bottom: 0; }
.learning-page .rhythm-guide h2 { margin-bottom: 12px; font-size: 20px; line-height: 1.55; }
.learning-page .jangdan-section { margin: 26px 0 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.learning-page .learning-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.learning-page .learning-actions a { justify-content: center; gap: 8px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); line-height: 1.5; text-decoration: none; }
.learning-page .learning-actions .learning-primary-action { border-color: var(--primary-bg); background: var(--primary-bg); color: var(--primary-text); font-weight: 600; }
.learning-page .learning-actions a:hover { border-color: var(--accent); }
.learning-page .learning-actions a:focus-visible, .learning-page .learning-toc a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (max-width: 480px) {
  .learning-summary { padding: 16px 17px; }
  .learning-toc { padding: 14px 16px; }
  .learning-page .learning-actions { align-items: stretch; flex-direction: column; }
  .learning-page .learning-actions a { width: 100%; }
}
.learn-group { margin: 24px 0; }
.learn-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.learn-card { display: flex; flex-direction: column; gap: 8px; min-height: 100px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.learn-card:hover, .learn-card[aria-current="page"] { border-color: var(--accent); }
.learn-card span { color: var(--muted); font-size: 14px; }
.learn-footer { max-width: none; margin: 0; padding: 8px 0 16px; border-top: 0; display: block; }
#practice-playing { font-size: 11px; color: var(--accent); }
@media (max-width: 480px) {
  .app-tabs { position: sticky; top: 0; z-index: 30; background: var(--paper, #faf8f3); gap: 0; }
  .app-tabs button { flex: 1; min-width: 0; min-height: 44px; padding: 10px 4px; font-size: 14px; white-space: nowrap; }
  #practice-playing { display: block; font-size: 10px; }
  #practice-playing[hidden] { display: none; }
}

.recommend-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.recommend-actions > button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; line-height: 1.4; white-space: nowrap; cursor: pointer; }
.recommend-actions > button:hover { border-color: var(--accent); color: var(--accent); }
.recommend-actions > button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Both quick actions share one secondary style (beats .share-trigger and generic button rules). */
#recommend-bar .recommend-actions > button { border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font-size: 14px; font-weight: 600; letter-spacing: 0; padding: 10px 16px; box-shadow: none; }
#recommend-bar .recommend-actions > button:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
.recommend-actions svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Unified listening actions and dismissible notifications. */
.toast { padding: 16px 20px; cursor: pointer; }
.video-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.video-actions > :is(button,a) { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; line-height: 1.5; text-decoration: none; text-align: center; }
.video-actions > .video-play { grid-column: 1 / -1; background: var(--primary-bg); color: var(--primary-text); border-color: var(--primary-bg); }
.video-actions > a:last-child { grid-column: 1 / -1; }
.video-actions > :is(button,a):hover { border-color: var(--accent); }
.video-actions > :is(button,a):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.video-actions svg { order: -1; width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media(max-width:480px) { .video-actions { grid-template-columns: 1fr; } .video-actions > * { grid-column: 1; } }
.video-player-heading button, .video-player-area > a { min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; }

/* learn panel */
#panel-learn > .learn-intro { margin: 8px 0 16px; color: var(--muted); }
#panel-learn .learn-start { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-subtle); color: var(--ink); text-decoration: none; }
#panel-learn .learn-start-label { color: var(--accent); font-size: 13px; font-weight: 700; }
#panel-learn .learn-start strong { font-size: 18px; }
#panel-learn .learn-start > span:last-child { color: var(--muted); font-size: 14px; }
#panel-learn .learn-group { margin: 22px 0 0; }
#panel-learn .learn-group h3 { margin: 0 0 10px; font-size: 16px; }
#panel-learn .learn-instruments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#panel-learn .learn-instrument { display: grid; align-content: center; gap: 2px; min-height: 64px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; }
#panel-learn .learn-instrument strong { font-size: 14px; }
#panel-learn .learn-instrument span { color: var(--muted); font-size: 12px; }
#panel-learn .learn-basics { margin: 0; padding: 0; list-style: none; }
#panel-learn .learn-basics li { border-bottom: 1px solid var(--line); }
#panel-learn .learn-basic-link { display: flex; flex-direction: column; gap: 2px; min-height: 56px; padding: 9px 4px; color: var(--ink); text-decoration: none; }
#panel-learn .learn-basic-link strong { font-size: 14px; }
#panel-learn .learn-basic-link span { color: var(--muted); font-size: 13px; }
#panel-learn :is(.learn-start, .learn-instrument, .learn-basic-link):hover,
#panel-learn :is(.learn-start, .learn-instrument, .learn-basic-link)[aria-current="page"] { border-color: var(--accent); }
#panel-learn :is(.learn-start, .learn-instrument, .learn-basic-link):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (min-width: 640px) {
  #panel-learn .learn-instruments { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  #panel-learn .learn-instrument { padding-inline: 8px; }
  #panel-learn .learn-instrument strong { font-size: 13px; }
}

/* videos v2 */
.video-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.video-group { min-width: 0; }
.video-group-title { margin: 0 0 8px; font-family: var(--sans); font-size: 18px; line-height: 1.35; }
.video-group-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.video-group-more { display: block; width: 100%; min-height: 44px; margin-top: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--accent); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.video-group-more:hover { border-color: var(--accent); }
.video-group-more:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.video-card { min-width: 0; padding: 9px; gap: 0; border-radius: 12px; overflow-wrap: anywhere; }
.video-instrument { margin: 0 0 2px; color: var(--muted); font-size: 11px; font-weight: 700; }
.video-card .video-title { display: -webkit-box; max-height: 2.5em; margin: 0; overflow: hidden; font-family: var(--sans); font-size: 17px; font-weight: 700; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.video-performer { margin: 3px 0 4px; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.video-description { display: -webkit-box; max-height: 2.7em; margin: 0; overflow: hidden; font-size: 12px; line-height: 1.35; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.video-tracks { margin-top: 2px; }
.video-tracks > summary { display: flex; align-items: center; min-height: 44px; color: var(--accent); font-size: 13px; font-weight: 700; cursor: pointer; }
.video-track-list { display: grid; gap: 4px; margin: 0; padding: 0 0 6px; list-style: none; }
.video-track-play, .video-track-title { display: flex; align-items: center; min-height: 44px; width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; line-height: 1.35; text-align: left; }
.video-track-play { cursor: pointer; }
.video-track-title { border-style: dashed; background: transparent; color: var(--muted); }
.video-actions { display: grid; grid-template-columns: minmax(56px, 1fr) auto auto; align-items: center; gap: 6px; margin-top: 4px; padding-top: 0; }
.video-actions > * { grid-column: auto; }
.video-actions > .video-play, .video-actions > a:last-child { grid-column: auto; }
.video-actions > :is(button, a) { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; white-space: nowrap; }
.video-actions > .video-play { border-color: var(--primary-bg); background: var(--primary-bg); color: var(--primary-text); }
.video-actions > .video-practice { background: var(--surface); }
.video-actions svg { width: 14px; height: 14px; flex: none; }
.video-filters, .video-school-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.video-school-filters[hidden] { display: none; }
.video-filter-chip { flex: 0 0 auto; min-height: 44px; padding: 8px 12px; text-align: center; white-space: nowrap; cursor: pointer; }
.video-filter-chip:hover, .video-actions > :is(button, a):hover, .video-track-play:hover { border-color: var(--accent); }
.video-filter-chip:focus-visible, .video-actions > :is(button, a):focus-visible, .video-track-play:focus-visible, .video-tracks > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 600px) {
  .video-filters, .video-school-filters { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; padding: 0 2px 4px; scrollbar-width: thin; scroll-snap-type: x proximity; }
  .video-filter-chip { scroll-snap-align: start; }
}
@media (min-width: 800px) {
  .video-group-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
