/* SunFalls Studio — framed music journal, no external assets.
 * Copyright (c) 2026 SunFalls. All rights reserved.
 * Built by EusebieDev. Proprietary; see LICENSE.
 */
:root {
  color-scheme: dark;
  --bg: #111310;
  --panel: #171915;
  --paper: #e3e1d5;
  --muted: #a1a397;
  --line: #51564a;
  --olive: #c0c78c;
  --red: #ef624c;
  --rail: 198px;
  --header-height: 64px;
  --rail-top: 81px;
  --mini-player-height: 0px;
  font-family: 'Courier New', monospace;
  color: var(--paper);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 16px;
  border: 1px solid var(--line);
  min-width: 0;
}
body::after {
  content: '';
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  opacity: 0.07;
  background: repeating-linear-gradient(0deg, transparent 0 3px, #000 3px 4px);
}
h1,
h2,
h3,
p {
  margin: 0;
}
a {
  color: var(--paper);
  text-underline-offset: 4px;
}
a:hover {
  color: var(--olive);
}
button,
input {
  font: inherit;
}
button {
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
button:hover {
  background: #30352b;
}
button:active {
  background: #3b4132;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}
#featured-tracks:focus {
  outline: 1px solid var(--red);
  outline-offset: 2px;
}
button:disabled,
input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
::selection {
  background: var(--red);
  color: var(--bg);
}
[hidden] {
  display: none !important;
}
[id] {
  scroll-margin-top: calc(var(--header-height) + 20px);
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  padding: 12px;
  background: var(--paper);
  color: var(--bg);
  z-index: 20;
}
.skip-link:focus {
  top: 20px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.2px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.6;
}
.red {
  color: var(--red);
}
.unavailable {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}

/* Persistent desktop shell; the rail follows the measured header. */
.system-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 64px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.wordmark {
  text-decoration: none;
  font-weight: bold;
  font-size: 22px;
  letter-spacing: -0.7px;
}
.wordmark span {
  color: var(--muted);
  font-size: 13px;
  font-weight: normal;
  letter-spacing: 1px;
}
.system-bar nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.system-bar nav a {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 0;
}
.system-light {
  width: 8px;
  height: 8px;
  background: var(--red);
}
.sidebar {
  position: fixed;
  top: var(--rail-top);
  bottom: 17px;
  left: 17px;
  width: var(--rail);
  z-index: 3;
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  overflow: auto;
  background: var(--bg);
}
.rail-heading {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.6px;
  color: var(--muted);
}
.rail-heading span:last-child {
  color: var(--red);
}
.play-button {
  width: 100%;
  height: 54px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 15px;
  background: var(--paper);
  color: var(--bg);
  border-color: var(--paper);
  font-weight: bold;
  letter-spacing: 1px;
  box-shadow: 3px 3px 0 #3d4235;
}
.play-button:hover {
  background: var(--olive);
}
#play-icon {
  font-size: 12px;
}
.transport {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 10px 0 22px;
}
.transport button {
  height: 40px;
  font-size: 12px;
}
.transport button + button {
  border-left: 0;
}
.volume-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  margin-bottom: 8px;
  color: var(--muted);
}
input[type='range'] {
  width: 100%;
  height: 28px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
input[type='range']::-webkit-slider-runnable-track {
  height: 3px;
  background: var(--line);
}
input[type='range']::-webkit-slider-thumb {
  appearance: none;
  width: 8px;
  height: 16px;
  margin-top: -6px;
  background: var(--paper);
  border: 0;
  border-radius: 0;
}
input[type='range']::-moz-range-track {
  height: 3px;
  background: var(--line);
}
input[type='range']::-moz-range-thumb {
  width: 8px;
  height: 16px;
  background: var(--paper);
  border: 0;
  border-radius: 0;
}
/* Touch: iOS won't jump to a tapped spot on the track, so the thumb is the
   only handle. Make it, and the row it sits in, finger-sized. */
@media (pointer: coarse) {
  input[type='range'] {
    height: 44px;
  }
  input[type='range']::-webkit-slider-thumb {
    width: 20px;
    height: 32px;
    margin-top: -14.5px;
  }
  input[type='range']::-moz-range-thumb {
    width: 20px;
    height: 32px;
  }
}
.rail-playing {
  margin-top: 18px;
  border-top: 1px solid #34392e;
  padding-top: 14px;
  min-width: 0;
}
#track-title {
  font:
    700 14px/1.35 Arial,
    sans-serif;
  overflow-wrap: anywhere;
}
#track-detail {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 7px;
  overflow-wrap: anywhere;
}
#player-state {
  display: block;
  margin-top: 10px;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--olive);
}
.mode-section {
  border-left: 1px solid var(--line);
  padding: 20px;
  min-width: 0;
}
.visual-toolbar {
  margin-top: 12px;
}
.mode {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #30342c;
  text-align: left;
  padding: 14px 8px;
  font-size: 11px;
  display: flex;
  gap: 13px;
  align-items: center;
}
.mode span {
  color: var(--muted);
  font-size: 9px;
}
.mode b {
  margin-left: auto;
  color: #51564a;
}
.mode.active {
  background: #2d3128;
  box-shadow: inset 2px 0 var(--red);
}
.mode.active b {
  color: var(--red);
}
.rail-footer {
  margin-top: auto;
  padding-top: 20px;
}
.calibration {
  font-size: 18px;
  color: var(--line);
  margin-bottom: 18px;
}
.rail-footer p {
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: 1px;
}
.rail-footer > span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 18px;
}

/* Featured music and player. */
main {
  margin-left: var(--rail);
  padding: 30px 26px 0;
  min-width: 0;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 30%);
  gap: 30px;
  align-items: stretch;
  padding: 4px 0 30px;
}
.hero-copy {
  min-width: 0;
  align-self: center;
}
.hero h1 {
  font-family: Impact, 'Arial Narrow', sans-serif;
  text-transform: uppercase;
  font-size: clamp(48px, 6.9vw, 106px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -1px;
  margin: 17px 0 21px;
  overflow-wrap: anywhere;
}
.hero-caption {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 55ch;
}
.release-details {
  border: 1px solid var(--line);
  padding: 20px;
  background: var(--panel);
  box-shadow: 3px 3px 0 #090a08;
  min-width: 0;
}
.release-details dl {
  margin: 0 0 20px;
}
.release-details dl div {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 14px 0;
  font-size: 10px;
  line-height: 1.6;
}
.release-details dt {
  color: var(--muted);
}
.release-details dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.release-details > p:last-child {
  border-top: 1px solid #34392e;
  padding-top: 14px;
}
.panel {
  border: 1px solid var(--line);
  box-shadow: 3px 3px 0 #090a08;
  margin-bottom: 18px;
  min-width: 0;
}
.panel-heading {
  min-height: 40px;
  border-bottom: 1px solid var(--line);
  padding: 11px 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
}
.panel-heading h2 {
  font-size: 11px;
  letter-spacing: 0.6px;
  font-weight: normal;
  line-height: 1.5;
}
.panel-heading > span {
  font-size: 9px;
  color: var(--muted);
}
.panel-heading > .track-count-label {
  color: var(--red);
}
.live-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}
.live-badge i {
  display: block;
  width: 6px;
  height: 6px;
  background: var(--muted);
}
.live-badge i.on {
  background: var(--red);
  box-shadow: 0 0 8px #ef624c55;
}
.field-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
}
#stage {
  position: relative;
  min-height: 360px;
  height: 100%;
  overflow: hidden;
}
#visualizer {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  inset: 0;
}
.field-coordinate,
.field-caption {
  position: absolute;
  left: 20px;
  right: 20px;
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.6px;
  color: var(--muted);
  pointer-events: none;
}
.field-coordinate {
  top: 18px;
}
.field-caption {
  bottom: 12px;
}
.seek-block {
  width: 100%;
  padding-top: 18px;
}
.time-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
#notice {
  margin-top: 16px;
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  color: var(--muted);
}
#notice:empty {
  display: none;
}

/* These graphic fields are explicitly labeled stand-ins for supplied artwork. */
.art-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(90deg, transparent 0 23px, #40473766 24px 25px),
    #1e241a;
  overflow: hidden;
}
.art-placeholder::before {
  content: '';
  position: absolute;
  width: 65%;
  height: 65%;
  border: 1px solid #87916b;
  transform: rotate(45deg);
}
.art-placeholder span {
  position: relative;
  font-size: 9px;
  letter-spacing: 1px;
  line-height: 1.7;
  padding: 8px 10px;
  text-align: center;
  background: var(--bg);
  color: var(--muted);
}
.featured-cover {
  width: 100%;
}
.hero-cover {
  margin: 16px 0 20px;
}
.rail-cover {
  margin: 16px 0 12px;
}
.rail-cover span {
  font-size: 8px;
  letter-spacing: 0;
  padding: 5px;
}
.release-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.release-card {
  padding: 18px;
  min-width: 0;
}
.release-card + .release-card {
  border-left: 1px solid var(--line);
}
.release-card .art-placeholder {
  aspect-ratio: 1.65;
  margin-bottom: 18px;
}
.art-two {
  background: repeating-linear-gradient(0deg, #29241e 0 9px, #544036 10px 11px);
}
.art-two::before {
  transform: rotate(-20deg);
  border-color: #ba715a;
  width: 45%;
}
.art-three {
  background: repeating-radial-gradient(
    ellipse at center,
    #181c17 0 10px,
    #444d3b 11px 12px
  );
}
.art-three::before {
  transform: none;
  border-color: #a3ac89;
  height: 42%;
}
.release-card h3 {
  font:
    700 20px/1.3 Arial,
    sans-serif;
  margin: 8px 0 12px;
  overflow-wrap: anywhere;
}
.release-card a {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
}
.lower-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
}
.demo-note {
  padding: 14px 18px 8px;
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
}
.track-list {
  list-style: none;
  margin: 0;
  padding: 6px 12px 12px;
  /* Roughly four 60px rows plus the existing vertical padding. */
  max-height: 258px;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-padding-block: 6px;
}
.track-list li + li {
  border-top: 1px solid #32372d;
}
.track-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  border: 0;
  padding: 12px 8px;
  min-height: 52px;
}
.track-button[aria-current='true'] {
  background: #292e24;
  color: var(--olive);
}
.track-number {
  font-size: 10px;
  color: var(--muted);
}
.track-copy {
  flex: 1;
  min-width: 0;
}
.track-copy strong {
  display: block;
  font-size: 12px;
  font-weight: normal;
  overflow-wrap: anywhere;
}
.track-copy small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}
.track-mark {
  color: var(--red);
  font-size: 14px;
}
.session-body {
  padding: 20px;
  font-size: 13px;
  line-height: 1.8;
}
.session-body .eyebrow {
  color: var(--olive);
  margin-bottom: 12px;
}
.credits {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid #34392e;
  color: var(--muted);
  font-size: 11px;
}
.credits dt {
  font-size: 10px;
  letter-spacing: 1px;
}
.credits dd {
  margin: 8px 0 0;
}
.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
}
.video-placeholder {
  min-height: 260px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, #40473766 32px 33px),
    repeating-linear-gradient(90deg, transparent 0 31px, #40473766 32px 33px),
    #191d16;
}
.video-placeholder > span:last-child {
  font-size: 10px;
  text-align: center;
  line-height: 1.7;
  color: var(--muted);
  background: var(--bg);
  padding: 8px;
}
.crosshair {
  font-size: 80px;
  line-height: 1;
  font-weight: normal;
  color: var(--red);
}
.studio-copy {
  border-left: 1px solid var(--line);
  padding: 24px;
  font-size: 12px;
  line-height: 1.8;
}
.studio-copy h3 {
  font:
    700 24px/1.2 Arial,
    sans-serif;
  margin: 16px 0;
  overflow-wrap: anywhere;
}
.studio-copy .unavailable,
.studio-copy a {
  display: block;
  margin-top: 24px;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
  padding: 12px 0 24px;
  color: var(--muted);
  font-size: 10px;
}
.page-footer h2 {
  font-size: 12px;
  font-weight: normal;
  color: var(--paper);
  margin-bottom: 8px;
}
.page-footer a {
  margin-right: 18px;
  line-height: 2;
}

/* Hidden on desktop; the mobile bar shares the full player's state. */
.mini-player {
  display: none;
}

/* Smaller screens and zoom: full controls flow beside the tracklist. */
@media (min-width: 1600px) {
  main {
    padding-left: 40px;
    padding-right: 40px;
  }
  .field-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  #stage {
    min-height: 440px;
  }
}
@media (max-width: 1100px) {
  :root {
    --rail: 166px;
  }
  .sidebar {
    padding: 22px 13px;
  }
  main {
    padding: 24px 18px 0;
  }
  .hero {
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 30%);
  }
  .hero h1 {
    font-size: clamp(42px, 6.4vw, 80px);
  }
  .release-details {
    padding: 16px 12px;
  }
  .field-layout {
    grid-template-columns: minmax(0, 1fr) 190px;
  }
  .mode-section {
    padding: 16px;
  }
  .release-card {
    padding: 14px;
  }
  .release-card .eyebrow {
    font-size: 9px;
  }
  .release-card h3 {
    font-size: 18px;
  }
  .lower-grid {
    grid-template-columns: 1fr 1fr;
  }
  .studio-copy {
    padding: 18px;
  }
}
@media (max-width: 800px) {
  html {
    scroll-padding-bottom: calc(var(--mini-player-height) + 12px);
  }
  body {
    margin: 10px;
    padding-bottom: var(--mini-player-height);
  }
  [id] {
    scroll-margin-top: 16px;
  }
  .system-bar {
    position: relative;
    padding: 14px 16px;
    gap: 12px 20px;
  }
  .wordmark {
    font-size: 20px;
  }
  .system-bar nav {
    gap: 18px;
  }
  .system-light {
    display: none;
  }
  .sidebar {
    position: relative;
    inset: auto;
    width: auto;
    border: 1px solid var(--line);
    padding: 18px;
    display: block;
    overflow: visible;
    z-index: auto;
    margin-bottom: 18px;
  }
  .transport-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 22px;
  }
  .transport-section > .eyebrow,
  .play-button,
  .transport,
  .volume-label,
  #volume {
    grid-column: 1;
  }
  .rail-playing {
    grid-column: 2;
    grid-row: 1 / 6;
    margin-top: 0;
  }
  .rail-cover {
    width: min(100%, 130px);
  }
  .rail-heading,
  .rail-footer {
    display: none;
  }
  .sidebar section {
    min-width: 0;
  }
  .mode-section {
    border-left: 1px solid var(--line);
  }
  .play-button {
    margin-top: 10px;
    height: 44px;
  }
  .transport {
    margin: 8px 0 12px;
  }
  .transport button {
    height: 44px;
  }
  .mode {
    padding: 14px 9px;
  }
  main {
    margin-left: 0;
    padding: 24px 16px 0;
  }
  .hero h1 {
    font-size: clamp(44px, 8.5vw, 68px);
  }
  .lower-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .mini-player {
    position: fixed;
    inset: auto 0 0;
    z-index: 6;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding:
      10px max(12px, env(safe-area-inset-right))
      calc(10px + env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: var(--bg);
  }
  .mini-player button,
  .mini-player a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    font-size: 11px;
  }
  .mini-player button {
    background: var(--paper);
    color: var(--bg);
    border-color: var(--paper);
    font-weight: bold;
  }
  .mini-player button:hover {
    background: var(--olive);
  }
  .mini-track {
    min-width: 0;
  }
  #mini-track-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.5;
  }
  #mini-player-state {
    margin-top: 4px;
    color: var(--olive);
    font-size: 10px;
    line-height: 1.5;
    letter-spacing: 0.6px;
  }
}
@media (max-width: 560px) {
  .system-bar nav {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .hero h1 {
    font-size: clamp(44px, 13vw, 72px);
  }
  .hero-caption {
    font-size: 12px;
  }
  .field-layout {
    grid-template-columns: 1fr;
  }
  #stage {
    height: 280px;
    min-height: 280px;
  }
  .transport-section {
    display: block;
  }
  .rail-playing {
    margin-top: 18px;
  }
  .rail-cover {
    width: min(100%, 130px);
  }
  .mode-section {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .release-grid,
  .lower-grid,
  .studio-layout {
    grid-template-columns: 1fr;
  }
  .release-card {
    padding: 18px;
  }
  .release-card + .release-card {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .release-card .art-placeholder {
    aspect-ratio: 1.9;
  }
  .lower-grid {
    gap: 0;
  }
  .studio-copy {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .video-placeholder {
    min-height: 210px;
  }
  .panel-heading {
    padding: 10px;
  }
  .panel-heading h2 {
    font-size: 10px;
  }
  .panel-heading > span {
    font-size: 8px;
  }
  .mode {
    gap: 8px;
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
