/* color scheme */

:root {
  /* gobal colors */
  /* --color-primary: #376691; */
  /* --color-primary: #062f75; */
  --color-primary: 	#395066;
  --color-grey-light: #c9c9c9;
  --color-grey-dark: #7b7b7b;
  --color-white: #ffffff;
  --color-shadow: #0003;
  --color-focus-outline: dodgerblue;
  --color-magenta: #de047c;
  --color-orange: #f55f02;

  /* light mode */
  --color-background-light: #ffffff; 
  --color-text-light: #121212;
  --color-primary-light: #376691;

  /* dark mode new */

  --color-darkmode-bkgd-base: #1f1f1f;
  --color-darkmode-bkgd-base-2: #262626;
  --color-darkmode-bkgd-shadow: #28283d;
  --color-darkmode-bkgd-primary: #1F1B24;
  --color-darkmode-bkgd-primary-2: #0e1924;
  --color-darkmode-bkgd-primary-3: #182d40;
  --color-darkmode-text: #ffffff;

  /* dark mode old */
  --color-background-dark: #1e2633;
  --color-text-dark: #ffffff;
  --color-primary-dark: #376691;
  --color-black-dark: #0a0a0a;
}

/* html */

html {
  font-size: 100%;
  background-color: var(--color-background-light);
  color: var(--color-text-light);
}

html.dark {
    background-color: var(--color-darkmode-bkgd-base);
    color: var(--color-text-dark);
}

/* body */

body {
  font-family: sans-serif;
  font-size: 1.2rem;
  padding: 25px 50px;
  max-width: 1200px;
  margin: auto;
}

/* main */

main {
  max-width: 80ch;
  margin: auto;
}

/* paragraph */

p {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.margin-bottom-none {
  margin-bottom: 0;
}

.txt-center {
  text-align: center;
}

.underline {
  text-decoration-line: underline;
}
/* headings */

h1, h2, h3, h4, h5, h6 {
  line-height: 1.4rem;
  margin: 0 0 1rem;
  padding: 0;
  word-wrap: break-word;
  margin-top: 1.8rem;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.2rem;
  line-height: 2.6rem;
}


h2 {
  font-size: 1.8rem;
  line-height: 2.2rem;
}

h3 {
  font-size: 1.6rem;
  line-height: 2rem;
}

h4 {
  font-size: 1.4rem;
  line-height: 1.8rem;
}

h5 {
  font-size: 1.3rem;
  line-height: 1.7rem;
}

/* lists */

ul,
ol {
  margin: 0 0 1.5rem 2rem;
  padding: 0;
}

li {

  /* margin-bottom: 0.5rem; */
}

.nav-margins {
  margin: 0;
  padding: 0;
}

/* input & textarea */

input {
  color: var(--color-text-light);
  background-color: var(--color-text-dark);
  border-radius: .4rem;
  padding: .3rem .8rem;
}

input::placeholder {
  color: var(--color-grey-dark);
}

textarea {
  background-color: var(--color-text-dark);
  border-radius: .4rem;
  padding: .3rem .8rem;
}

textarea:focus-visible {
  padding: 3px 3px 3px 3px;
  outline-offset: 3px;
  outline: 3px solid var(--color-focus-outline);
  border-radius: .5rem;
}

textarea::placeholder {
  color: var(--color-grey-dark);
  color: var(--color-grey-dark);
}

/* links */

/* all links */

a {
  color: var(--color-text-light);
  border-color: var(--color-background-dark);
  text-decoration: none;
}

.dark a {
  color: var(--color-text-dark);
}

.dark .nav-links {
  border-color: var(--color-text-dark);
  color: var(--color-text-dark);
}

/* tab selected links */
a:focus-visible {
  padding: 3px 3px 3px 3px;
  outline-offset: 3px;
  outline: 3px solid var(--color-focus-outline);
  border-radius: .5rem;
}

/* mouse over link & when you click or hold */
a:hover,
a:active {
  border-color: var(--color-text-light);
  text-decoration: underline;
}

.dark a:hover,
.dark a:active {
  border-color: var(--color-text-dark);
}

/* images */

/**
 * Prevent img, video, and svg elements from spilling outside of the page on smaller screens.
 */
img,
video,
svg {
    max-width: 100%;
    border-radius: 25px;
}

img,
video {
    height: auto;
}

.headshot {
    display: block;
    margin: 1rem auto 2rem;
    margin-top: 1.5rem;
   /* box-shadow: 0px 0px 5px 2px var(--color-grey-dark); */
}

/* nav */

/* nav elements */

.container-nav {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.container-nav-top {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.list-nav {
  display: flex;
  flex-direction: row;
  margin: auto;
  text-align: center;
}

.list-items {
  padding: 0 .4rem;
}

.container-nav-theme {
  min-width: 10rem;
  margin: auto;
}

.list-nav {
  list-style: none;
}

.title-nav {
  font-weight: 600;
  font-size: 1.3rem;
}

/* theme toggle switch */

#theme-toggle input {
  appearance: none;
  position: relative;
  display: inline-block;
  background: var(--color-grey-dark);
  height: 1.65rem;
  width: 2.75rem;
  vertical-align: middle;
  border-radius: 2rem;
  box-shadow: 0px 1px 3px var(--color-shadow) inset;
  transition: 0.25s linear background;
}

#theme-toggle input::before {
  content: "";
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--color-white);
  border-radius: 50%;
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  box-shadow: 0px 1px 3px var(--color-shadow);
  transition: 0.25s linear transform;
  transform: translateX(0rem);
}

input:focus-visible {
  outline: 3px solid var(--color-focus-outline);
  outline-offset: 3px;
}

#theme-toggle :checked {
  background: var(--color-grey-light);
}

#theme-toggle :checked::before {
  transform: translateX(1rem);
}

.dark #theme-toggle {
  color: var(--color-text-dark);
}

.toggle-text {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* nav styles for tablet & desktop */

@media screen and (min-width: 775px) {

  /* nav container */

  .container-nav {
    display: block;
    flex-direction: column;
    justify-content: space-between;
    column-gap: 3rem;
    align-items: center;
  }

  .container-nav-top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .container-nav-theme-switch {
    display: flex;
    justify-content: flex-end;
    min-width: 8rem;
  }

  .container-nav-title {
    margin: 0%;
    min-width: 15rem;
  }

  .container-nav-list {
    display: flex;
    flex-direction: row;
    margin: 0%;
  }

  /* nav list */

  .list-nav {
    list-style: none;
    display: flex;
    column-gap: .3rem;
  }

}


  /* taxonomy container */

.taxonomy-cloud {
  margin: auto;
  margin-top: 1.5rem;
  max-width: 80vw;
  display: flex; 
  flex-direction: row; 
  flex-wrap: wrap; 
  justify-content: center;
  border: 2px solid var(--color-text-dark);
  padding-top: .75rem;
  padding-bottom: 1rem;
  border-radius: 1rem;
}

.taxonomy-items {
  margin: .5rem;
}

/* form container */

.container-form {
  margin: 20px;
  padding: 15px;
  border: 2px solid var(--color-text-light);
  border-radius: .5rem;
  max-width: 25rem;
  margin-left: auto;
  margin-right: auto;
}

.dark .container-form {
  border: 1.5px solid var(--color-text-dark);
}

/* form input fields */

.field-form {
  margin: 15px;
  display: flex;
  flex-direction: column;
}

/* buttons */

button,
.btn {
  border-color: none;
  background-color: var(--color-background-light);
  /* border: 0.125rem solid var(--color-primary); */
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: normal;
  line-height: 1.2;
  margin-right: 0.3125rem;
  margin-bottom: 0.3125rem;
  padding: 0.5rem 0.6875rem;
  box-shadow: 0px 0px 5px var(--color-darkmode-bkgd-base);
}

.dark button,
.dark .btn {
  background-color: var(--color-darkmode-bkgd-base);
  color: var(--color-text-dark);
  box-shadow: 0px 0px 5px var(--color-grey-light);
  /* border-color: none; */
}

button:hover,
button:active,
.btn:hover,
.btn:active {
  color: var(--color-text-light);
  background-color: var(--color-white);
  border-color: var(--color-text-light);
  text-decoration: none;
}

.btn-center {
  display: table;
  margin: auto;
}

.dark button:hover,
.dark button:active,
.dark .btn:hover,
.dark .btn:active {
  color: var(--color-text-light);
  background-color: var(--color-text-dark);
  border-color: var(--color-text-dark);
}

button:focus-visible,
.btn:focus-visible {
  padding: 3px 3px 3px 3px;
  outline-offset: 3px;
  outline: 3px solid var(--color-focus-outline);
  border-radius: .5rem;
}

.margin-bottom-sm {
  margin-bottom: 0.3rem;
}

.container-button {
  display: flex;
  justify-content: center;
}

/* blog post card */

.blog-post-card {
  /* margin: 1rem; */
  margin: 3rem 0;
  padding: 1rem;
  border-radius: 20px;
}

.dark .blog-post-card {
  /* margin: 1rem; */
  padding: 1rem;
  border-radius: 20px;
  /* border: 2px solid var(--color-text-dark); */
  background: var(--color-darkmode-bkgd-base);
  /* box-shadow: 0px 10px 50px 10px #28283d; */
}

.margin-top-none {
  margin: 0;
}

.parent {
   position: relative;
   border-radius: 20px;
   box-shadow: 0px 0px 5px 2px var(--color-grey-dark);
}

/* pagination */

.pagination {
  display: flex;
  list-style: none;
  margin: 0;
  margin-top: .75rem;
  justify-content: center;
}

.page-item {
  padding: 1rem;
}

/* footer */

.footer-container {
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.footer-address {
  font-style: normal;
  line-height: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding-bottom: .3rem;
}

.footer-business {
  font-size: 1.15rem;
  margin-bottom: .15rem;
}

.footer-copyright {
  max-width: fit-content;
  margin: auto;
  margin-bottom: 0;
}

#mail {
  padding-top: .5rem;
}

.footer-links {
  text-align: center;
}
@media screen and (min-width: 800px) {
  
  .footer-container {
    flex-direction: row;
  }

  .footer-address {
    text-align: left;
    padding-bottom: .5rem;
  }

  #mail {
    padding-top: 0;
  }

  .footer-links {
    text-align: right;
  }

}

/* ==========================================================================
   Sound Maker Lab (2026-11-28). Everything above is hugo-min's stylesheet, with
   one change: the theme switch knob rule is scoped to #theme-toggle.
   ========================================================================== */

/* palette: named colors for the app, redefined for dark mode */

:root {
  --panel: #f1f2f6;
  --panel-border: #d5d8e2;
  --muted: #555a6b;
  --accent: var(--color-magenta);
  --accent-text: #ffffff;
  --pressed: #0b6f94;
  --pressed-text: #ffffff;
  --cell: #e1e4ee;
  --cell-beat: #cdd2e2;
  --key-white: #ffffff;
  --key-black: #1f1f1f;
  --key-down: var(--color-orange);
  --recording: #d92626;
}

html.dark {
  --panel: var(--color-darkmode-bkgd-base-2);
  --panel-border: #3a3a3a;
  --muted: #b9bbc6;
  --accent: #ff4fa3;
  --accent-text: #1b0b14;
  --pressed: #3ddcff;
  --pressed-text: #04222b;
  --cell: #333338;
  --cell-beat: #45454d;
  --key-white: #f4f4f4;
  --key-black: #0a0a0a;
}

/* phones: less side padding, and long words wrap */

@media screen and (max-width: 774.98px) {
  body {
    padding: 25px 20px;
  }
}

main {
  overflow-wrap: break-word;
}

/* the areas and the home page use the full page width */

.main-wide {
  max-width: none;
}

/* icons (drawn by partials/icon.html, or by icon() in static/js/ui.js) */

.icon {
  flex: none;
  margin-right: 0.4em;
  vertical-align: -0.125em;
  border-radius: 0;
  overflow: visible;
}

/* nav: the current area is underlined */

.list-nav {
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 0.4rem;
}

.list-items a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.35em;
  text-decoration-color: var(--accent);
}

/* footer menu */

.footer-menu {
  list-style: none;
  margin: 0;
  line-height: 1.6rem;
}

/* home page: one card per area */

.area-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.area-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1.6rem 1rem;
  border: 2px solid var(--panel-border);
  border-radius: 20px;
  background: var(--panel);
  text-align: center;
}

.area-card:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.area-icon {
  font-size: 3.5rem;
  line-height: 1.2;
  color: var(--accent);
}

.area-icon .icon {
  margin-right: 0;
}

.area-title {
  font-size: 1.4rem;
  font-weight: 600;
}

.area-summary {
  color: var(--muted);
  font-size: 1rem;
}

/* area pages: heading and hint */

.area-title-main {
  margin-top: 0.5rem;
  margin-bottom: 0.4rem;
}

.area-hint {
  font-weight: 600;
  margin-top: 0;
}

.note {
  color: var(--muted);
  font-size: 0.95rem;
}

/* buttons: additions to hugo-min's button. Custom looks are written for
   .dark too, because the template's ".dark button" rule outranks a bare class */

button {
  cursor: pointer;
  min-height: 2.75rem;
  border: 2px solid transparent;
  color: var(--color-text-light);
}

.btn-primary,
.dark .btn-primary {
  background-color: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}

button[aria-pressed="true"],
.dark button[aria-pressed="true"] {
  background-color: var(--pressed);
  color: var(--pressed-text);
}

.btn-recording,
.dark .btn-recording {
  background-color: var(--recording);
  color: #ffffff;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.9rem 0;
}

.toolbar button,
.chips button,
.big-buttons button {
  margin: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0.6rem 0;
}

.option-name {
  min-width: 5.5rem;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
}

.big-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.6rem;
  margin: 1rem 0;
}

.big-buttons button {
  min-height: 4rem;
  font-size: 1.15rem;
}

/* sliders and text boxes */

input[type="range"] {
  flex: 1;
  min-width: 8rem;
  height: 2rem;
  padding: 0;
  background: none;
  accent-color: var(--pressed);
}

input[type="text"] {
  flex: 1 1 14rem;
  max-width: 26rem;
  min-height: 2.75rem;
  font-size: 1.1rem;
  border: 2px solid var(--color-grey-dark);
}

.tempo {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.5rem;
  max-width: 28rem;
  font-size: 1rem;
}

.slider {
  display: grid;
  grid-template-columns: 9rem 1fr;
  align-items: center;
  column-gap: 0.6rem;
  margin-top: 0.7rem;
}

.slider-name {
  font-size: 1.05rem;
  font-weight: 600;
}

.slider-hint {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.9rem;
}

/* cards: a boxed group of controls */

.card {
  margin: 1rem 0;
  padding: 0.9rem 1.1rem 1.1rem;
  border: 2px solid var(--panel-border);
  border-radius: 20px;
  background: var(--panel);
}

.card-title {
  margin: 0 0 0.7rem;
  font-size: 1.2rem;
  line-height: 1.6rem;
}

/* game music: the song grid */

.grid {
  --steps: 16;
  display: grid;
  grid-template-columns: 5.6rem repeat(var(--steps), minmax(1.6rem, 1fr));
  gap: 3px;
  overflow-x: auto;
  margin-top: 1rem;
  padding: 4px;
  user-select: none;
}

.track-title {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* grid squares and row names are buttons, so these rules have to outrank
   the template's button, hover, focus, and dark-mode rules */

:is(.grid .row-label, .dark .grid .row-label):is(*, :hover, :active, :focus-visible) {
  min-height: 0;
  height: 2.1rem;
  margin: 0;
  padding: 0 0.4rem;
  overflow: hidden;
  border: 0;
  border-left: 0.5rem solid hsl(var(--hue) 85% 50%);
  border-radius: 0.5rem;
  box-shadow: none;
  background-color: var(--panel);
  color: inherit;
  font-size: 0.85rem;
  white-space: nowrap;
}

:is(.grid .cell, .dark .grid .cell):is(*, :hover, :active, :focus-visible) {
  min-height: 0;
  height: 2.1rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0.4rem;
  box-shadow: none;
  background-color: var(--cell);
  touch-action: none;
}

:is(.grid .cell.beat, .dark .grid .cell.beat):is(*, :hover, :active, :focus-visible) {
  background-color: var(--cell-beat);
}

:is(.grid .cell, .dark .grid .cell)[aria-pressed="true"]:is(*, :hover, :active, :focus-visible) {
  background-color: hsl(var(--hue) 85% 52%);
}

.grid .cell.now {
  filter: brightness(1.35) saturate(1.3);
  outline: 2px solid var(--muted);
  outline-offset: -2px;
}

/* synth: wave picture and piano keys */

.scope {
  display: block;
  width: 100%;
  height: 7rem;
  margin: 1rem 0;
  border: 2px solid var(--panel-border);
  border-radius: 20px;
  background: var(--panel);
  color: var(--pressed);
}

.synth-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  column-gap: 1rem;
}

.keys {
  --whites: 15;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--whites), 1fr);
  gap: 3px;
  height: 11rem;
  user-select: none;
  touch-action: none;
}

:is(.keys .key, .dark .keys .key):is(*, :hover, :active, :focus-visible) {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
  margin: 0;
  padding: 0 0 0.5rem;
  border: 2px solid var(--color-grey-dark);
  border-top: 0;
  border-radius: 0 0 0.5rem 0.5rem;
  box-shadow: none;
  background-color: var(--key-white);
  color: #555a6b;
  font-size: 0.9rem;
  touch-action: none;
}

:is(.keys .key.black, .dark .keys .key.black):is(*, :hover, :active, :focus-visible) {
  position: absolute;
  top: 0;
  left: calc(var(--at) * 100% / var(--whites));
  z-index: 1;
  width: calc(100% / var(--whites) * 0.6);
  height: 60%;
  transform: translateX(-50%);
  background-color: var(--key-black);
  color: #c9c9c9;
}

:is(.keys .key, .dark .keys .key).down:is(*, :hover, :active, :focus-visible) {
  background-color: var(--key-down);
  color: #ffffff;
}

/* toast: a short message that pops up at the bottom */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  max-width: 90vw;
  padding: 0.6rem 1.1rem;
  border-radius: 0.9rem;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s linear opacity;
}

.toast.show {
  opacity: 1;
}

/* build a sound: every option is a slider, all on screen at once (2026-11-28) */

.build-sliders .slider {
  grid-template-columns: 13rem 1fr;
  margin-top: 1rem;
}

.build-group {
  margin: 1.6rem 0 0;
  padding-top: 0.9rem;
  border-top: 2px solid var(--panel-border);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.build-group:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

button:disabled {
  opacity: 0.45;
  cursor: default;
}

/* two pictures side by side: the wave up close, and loudness over time */

.scope-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  column-gap: 1rem;
}

.scope-figure {
  margin: 0;
}

.scope-figure .scope {
  margin-bottom: 0.3rem;
}

/* a link that looks like a button, inside a toolbar */

.toolbar .btn {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: 2.75rem;
  margin: 0;
  border: 2px solid transparent;
}

/* effects pedals: a row of stompboxes (2026-11-28). The pedals keep their own
   colors in both themes, like real painted metal boxes. */

.pedalboard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.pedal {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.9rem 0.8rem 0.8rem;
  border: 3px solid hsl(var(--hue) 45% 22%);
  border-radius: 16px;
  background: hsl(var(--hue) 50% 34%);
  color: #ffffff;
  filter: saturate(0.55);
}

.pedal.on {
  filter: none;
}

.pedal-name {
  font-size: 1.15rem;
  font-weight: 600;
}

.pedal-hint {
  flex: 1;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.2rem;
}

/* the little light in the corner glows when the pedal is on */

.pedal-light {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: #3a0d0d;
  box-shadow: 0 0 0 2px #00000055;
}

.pedal.on .pedal-light {
  background: #ff4040;
  box-shadow: 0 0 0 2px #00000055, 0 0 10px 3px #ff5a5a;
}

.pedal-knob {
  display: grid;
  grid-template-columns: 4rem 1fr;
  align-items: center;
  font-size: 0.85rem;
}

.pedal-knob input[type="range"] {
  min-width: 0;
  accent-color: #ffffff;
}

/* the foot switch: a button, so it has to outrank the template's button rules */

:is(.pedal .pedal-switch, .dark .pedal .pedal-switch):is(*, :hover, :active, :focus-visible) {
  align-self: center;
  width: 4.2rem;
  height: 4.2rem;
  min-height: 0;
  margin: 0.3rem 0 0;
  padding: 0;
  border: 4px solid #8d8d8d;
  border-radius: 50%;
  box-shadow: 0 3px 0 #00000066;
  background-color: #d9d9d9;
  color: #1f1f1f;
  font-weight: 600;
}

:is(.pedal .pedal-switch, .dark .pedal .pedal-switch)[aria-pressed="true"]:is(*, :hover, :active, :focus-visible) {
  box-shadow: 0 1px 0 #00000066;
  transform: translateY(2px);
  background-color: #ffffff;
}

/* synth: the sound sliders sit in two columns on wide screens */

@media screen and (min-width: 775px) {
  .slider-columns {
    columns: 2;
    column-gap: 2rem;
  }

  .slider-columns .slider {
    break-inside: avoid;
  }
}

/* frozen top: the pictures (and the Play buttons) stay at the top of the
   window while the sliders scroll underneath, like a frozen spreadsheet row */

.sticky-top {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 -0.5rem;
  padding: 0.5rem 0.5rem 0.1rem;
  border-bottom: 2px solid var(--panel-border);
  background-color: var(--color-background-light);
}

.dark .sticky-top {
  background-color: var(--color-darkmode-bkgd-base);
}

/* inside the frozen top, the pictures always share one row and sit lower */

.sticky-top .scope-pair {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  column-gap: 0.6rem;
}

.sticky-top .scope {
  height: 5.5rem;
  margin-top: 0;
}

.sticky-top .toolbar {
  margin: 0.5rem 0;
}

@media screen and (max-width: 774.98px) {
  .sticky-top .scope {
    height: 4rem;
  }

  .sticky-top figcaption {
    display: none;
  }
}

/* game music: long notes. A held square joins onto the note before it, so a
   long note reads as one bar (2026-11-28) */

:is(.grid .cell, .dark .grid .cell).held:is(*, :hover, :active, :focus-visible) {
  width: calc(100% + 3px);
  margin-left: -3px;
  border-radius: 0 0.4rem 0.4rem 0;
  background-color: hsl(var(--hue) 85% 62%);
}

:is(.grid .cell, .dark .grid .cell).holds:is(*, :hover, :active, :focus-visible) {
  border-radius: 0.4rem 0 0 0.4rem;
}

:is(.grid .cell, .dark .grid .cell).held.holds:is(*, :hover, :active, :focus-visible) {
  border-radius: 0;
}
