/* ── YTT Header ── */
body {
  padding-top: 60px;
}

#ytt-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 60px; display: flex; align-items: center;
  padding: 0 40px; justify-content: space-between;
  background: #0A0F10; border-bottom: 1px solid #1E2C2F;
}
.ytt-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.ytt-logo img { height: 32px; width: auto; }
.ytt-logo-fallback { font-family: 'IBM Plex Mono', monospace; font-size: 1.1rem; font-weight: 600; color: #7EE8FA; letter-spacing: 0.05em; display: none; }
.ytt-nav { display: flex; align-items: center; gap: 32px; }
.ytt-nav a { font-family: 'IBM Plex Mono', monospace; font-size: 0.85rem; color: #6A7A7D; text-decoration: none; letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.2s; }
.ytt-nav a:hover { color: #7EE8FA; }
.ytt-nav-cta { color: #7EE8FA !important; border: 1px solid #1E2C2F; padding: 6px 14px; border-radius: 2px; transition: border-color 0.2s !important; }
.ytt-nav-cta:hover { border-color: #7EE8FA !important; }
.ytt-hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.ytt-hamburger span { display: block; width: 22px; height: 1px; background: #8DA8AC; }
.ytt-mobile-nav { display: none; position: fixed; inset: 0; background: #0A0F10; z-index: 999; flex-direction: column; align-items: center; justify-content: center; gap: 32px; }
.ytt-mobile-nav.open { display: flex; }
.ytt-mobile-nav a { font-family: 'IBM Plex Mono', monospace; font-size: 1.1rem; color: #8DA8AC; text-decoration: none; text-transform: uppercase; letter-spacing: 0.15em; transition: color 0.2s; }
.ytt-mobile-nav a:hover { color: #7EE8FA; }
.ytt-mobile-close { position: absolute; top: 20px; right: 40px; background: none; border: none; color: #6A7A7D; font-size: 1.5rem; cursor: pointer; font-family: 'IBM Plex Mono', monospace; }
@media (max-width: 900px) { .ytt-nav { display: none; } .ytt-hamburger { display: flex; } }

/* ── YTT Identity Block ── */
.ytt-identity {
  text-align: center;
  padding: 48px 0 8px;
}
.ytt-identity-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 2rem;
  font-weight: 600;
  color: #7EE8FA;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.ytt-identity-sub {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.85rem;
  color: #6A7A7D;
  letter-spacing: 0.05em;
}
.ytt-identity-sub a {
  color: #8DA8AC;
  text-decoration: none;
  transition: color 0.2s;
}
.ytt-identity-sub a:hover { color: #7EE8FA; }

:root {
  font-family: 'IBM Plex Sans', sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color: #8DA8AC;
  background-color: #0A0F10;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  background: #0A0F10;
}

#app {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid #1E2C2F;
}

h1 {
  display: none;
}

.subtitle-main {
  font-size: 1.5em;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #7EE8FA;
}

.subtitle {
  color: #6A7A7D;
  font-size: 1.1em;
  margin: 0;
}

.controls-container {
  background: #141D1F;
  border: 1px solid #1E2C2F;
  border-radius: 4px;
  padding: 30px;
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

label {
  font-weight: 600;
  font-size: 0.9em;
  color: #8DA8AC;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tempo-control {
  display: flex;
  gap: 15px;
  align-items: center;
}

input[type="range"] {
  flex: 1;
  height: 6px;
  background: #1E2C2F;
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #7EE8FA;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #7EE8FA;
  cursor: pointer;
  border-radius: 50%;
  border: none;
  transition: transform 0.2s;
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.2);
}

input[type="number"] {
  width: 80px;
  padding: 10px;
  background: #0A0F10;
  border: 1px solid #1E2C2F;
  border-radius: 3px;
  color: #E8F4F6;
  font-size: 1em;
  font-weight: 500;
  text-align: center;
}

input[type="number"]:focus {
  outline: none;
  border-color: #7EE8FA;
  background: rgba(126, 232, 250, 0.05);
}

select {
  padding: 12px;
  background: #0A0F10;
  border: 1px solid #1E2C2F;
  border-radius: 3px;
  color: #E8F4F6;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.2s;
}

select option {
  background: #141D1F;
  color: #E8F4F6;
}

select:hover {
  background: #141D1F;
  border-color: #6A7A7D;
}

select:focus {
  outline: none;
  border-color: #7EE8FA;
  background: rgba(126, 232, 250, 0.05);
}

.timeline-container {
  margin-bottom: 40px;
  transition: all 0.3s;
}

.timeline-container.compact {
  margin-bottom: 20px;
}

.timeline-container.compact h2 {
  font-size: 1.1em;
  margin-bottom: 10px;
}

.timeline-container h2 {
  font-size: 1.5em;
  margin-bottom: 20px;
  color: #E8F4F6;
  transition: all 0.3s;
}

.timeline {
  background: #0A0F10;
  border: 1px solid #1E2C2F;
  border-radius: 4px;
  padding: 20px;
  min-height: 150px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  transition: all 0.3s;
}

.timeline.compact {
  padding: 10px;
  min-height: 80px;
}

.section-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 100px;
  text-align: center;
  position: relative;
}

.timeline.compact .section-block {
  padding: 8px;
  min-width: 60px;
}

.section-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.section-name {
  font-weight: 700;
  font-size: 0.95em;
  margin-bottom: 5px;
  color: rgba(0, 0, 0, 0.9);
}

.section-description {
  font-size: 0.8em;
  color: rgba(0, 0, 0, 0.7);
  line-height: 1.3;
}

.section-bars {
  position: absolute;
  bottom: 5px;
  right: 8px;
  font-size: 0.7em;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.5);
}

.section-block.editing {
  outline: 3px solid white;
  outline-offset: 2px;
}

.edit-input {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.9em;
  color: #0a0a0a;
  font-weight: 600;
  text-align: center;
  width: 100%;
  margin-bottom: 4px;
}

.edit-input:focus {
  outline: 2px solid #00d4ff;
}

.download-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  padding: 20px;
}

.download-btn {
  padding: 15px 40px;
  font-size: 1.1em;
  font-weight: 600;
  background: transparent;
  color: #7EE8FA;
  border: 1px solid #7EE8FA;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: none;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: none;
  background: #7EE8FA;
  color: #0A0F10;
}

.download-btn:active {
  transform: translateY(0);
}

.orchestrate-button-container {
  display: flex;
  justify-content: center;
  padding: 20px;
  margin-bottom: 20px;
}

.orchestrate-btn {
  padding: 15px 50px;
  font-size: 1.1em;
  font-weight: 600;
  background: transparent;
  color: #7EE8FA;
  border: 1px solid #7EE8FA;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: none;
}

.orchestrate-btn:hover {
  transform: translateY(-2px);
  box-shadow: none;
  background: #7EE8FA;
  color: #0A0F10;
}

.orchestrate-btn:active {
  transform: translateY(0);
}

.orchestration-container {
  margin-bottom: 30px;
}

.orchestration-controls {
  display: flex;
  gap: 15px;
  justify-content: center;
  padding: 20px;
  margin-bottom: 20px;
}

.nav-btn {
  padding: 12px 30px;
  font-size: 1em;
  font-weight: 600;
  background: transparent;
  color: #8DA8AC;
  border: 1px solid #1E2C2F;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn:hover {
  background: #141D1F;
  border-color: #6A7A7D;
  transform: translateY(-1px);
}

.nav-btn:active {
  transform: translateY(0);
}

.timeline-guide {
  background: #0A0F10;
  border: 1px solid #1E2C2F;
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 15px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
}

.guide-block {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: #1E2C2F;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  min-width: 60px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-view {
  background: #0A0F10;
  border: 1px solid #1E2C2F;
  border-radius: 4px;
  padding: 15px;
  overflow-x: auto;
}

.track-row {
  display: flex;
  gap: 2px;
  margin-bottom: 5px;
  align-items: stretch;
}

.track-row:last-child {
  margin-bottom: 0;
}

.track-label {
  min-width: 100px;
  max-width: 100px;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.8em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.track-lane {
  width: 100%;
  display: flex;
  gap: 2px;
  min-height: 35px;
}

.lane-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
  padding: 4px;
  min-width: 40px;
}

.lane-block.active {
  font-weight: 600;
  font-size: 0.85em;
  color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.lane-block.active:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.detail-annotation {
  font-size: 0.7em;
  color: rgba(0, 0, 0, 0.7);
  margin-top: 3px;
  text-align: center;
  line-height: 1.2;
  font-weight: 500;
}

.detail-track {
  opacity: 0.8;
}

.mobile-section-card {
  background: #141D1F;
  border: 1px solid #1E2C2F;
  border-radius: 4px;
  margin-bottom: 15px;
  overflow: hidden;
}

.mobile-section-header {
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1E2C2F;
}

.mobile-section-name {
  font-weight: 700;
  font-size: 1.1em;
  color: rgba(0, 0, 0, 0.9);
}

.mobile-section-bars {
  font-size: 0.9em;
  color: rgba(0, 0, 0, 0.7);
  font-weight: 600;
}

.mobile-instruments-list {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-instrument-item {
  padding: 12px 15px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95em;
  color: rgba(0, 0, 0, 0.9);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mobile-detail-annotation {
  font-size: 0.8em;
  color: rgba(0, 0, 0, 0.7);
  margin-top: 5px;
  font-weight: 500;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2em;
  }

  .controls-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .timeline-container.compact {
    display: none;
  }

  .timeline {
    flex-direction: column;
    gap: 10px;
  }

  .section-block {
    width: 100%;
  }

  .download-container {
    flex-direction: column;
  }

  .download-btn {
    width: 100%;
  }

  .orchestration-controls {
    flex-direction: column;
    gap: 10px;
  }

  .nav-btn {
    width: 100%;
  }

  .timeline-guide {
    flex-direction: column;
    gap: 5px;
  }

  .guide-block {
    width: 100%;
    min-width: auto;
  }

  .track-view {
    overflow-x: scroll;
  }

  .track-row {
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
    background: #141D1F;
    padding: 10px;
    border-radius: 8px;
  }

  .track-label {
    width: 100%;
    min-width: auto;
  }

  .track-lane {
    width: 100%;
    flex-wrap: wrap;
    min-height: auto;
  }

  .lane-block {
    min-width: 80px;
    flex: 1;
  }

  .orchestrate-btn {
    width: 100%;
    max-width: 300px;
  }
}
