:root {
  --fg-bg: var(--tt-ground,#f1f1f0);
  --fg-ink: var(--tt-ink,#252b36);
  --fg-acc: var(--fg-ink);
  --fg-mute: var(--tt-ink2,#52575f);
  --fg-line: var(--tt-hair2,#b4b6b8);
  --fg-sans: Geist, "IBM Plex Sans JP", system-ui, sans-serif;
  --fg-mono: "Geist Mono", ui-monospace, monospace;
}
body { margin: 0; }
html[data-design] body > .fg-cover,
html[data-design] body .fg-tour,
html[data-design] body .fg-toast,
html[data-design] body > .fg-bar {
  background: var(--fg-bg) !important;
}
body:has(> .fg-cover:not([hidden])) > :is(#app, .fg-bar) {
  visibility: hidden !important;
}
.fg-cover:has(.fg-nums:empty) .fg-nums { display: none; }
.fg-cover-text { min-width: 0; }
.fg-cover .fg-promise { max-width: 34rem; }
.fg-cover .fg-mark { object-fit: contain; }
.fg-bar {
  max-width: 1500px;
  margin: 0 auto;
}
.fg-bar-text { text-transform: none; letter-spacing: .03em; }
.flow-mobile-art {
  display: block;
  width: 100%;
  height: 324px;
  border: 1px solid var(--fg-line);
}
.flow-mobile-sample {
  display: grid;
  gap: 14px;
  margin: 8px 0 12px;
}
.flow-mobile-sample audio { width: 100%; }
.flow-mobile-language { display: flex; gap: 8px; }
.flow-mobile-language button { min-height: 36px; padding: 0 12px; }
html[data-design] body > .fg-small p { font-size: 16px; }
#app #pitch-panel .library-tabs .fg-locked { opacity: .64; }
#midi-panel:empty { display: none; }
#midi-analysis-actions, .trial-export-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}
#trial-output-dialog { width: min(520px, calc(100vw - 32px)); }
#trial-output-dialog > label { display: flex; align-items: center; gap: 8px; }
#trial-output-dialog .trial-export-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#trial-output-dialog .trial-export-options button { text-align: left; }
#progression-grid .progression-choice.fg-locked,
#pitch-panel .recipe.fg-locked,
.sound-menu button.fg-locked { opacity: .55 !important; }
#progression-grid .progression-choice.fg-locked:hover,
#pitch-panel .recipe.fg-locked:hover,
.sound-menu button.fg-locked:hover { opacity: .75 !important; }
#stage { touch-action: none; }
body[data-look=c][data-tool=draw] #stage { cursor: crosshair; }

/* Rounded Flow controls shared by all three trial themes. */
html[data-design] #app header.top {
  border-bottom-color: transparent !important;
  padding-bottom: 7px !important;
  margin-bottom: 10px !important;
}
html[data-design] #app :is(.delivery, .edit-heading > div:first-child, #pitch-panel)::before {
  content: none !important;
}
html[data-design] #app #pitch-panel {
  border-left-color: transparent !important;
  padding-top: 11px !important;
}
html[data-design] #app .instrument.product31 :is(
  #animate, #midi-drag, #preset-open, #sound-pick, #project-open, #back-all,
  #tools-open, #sound-open, #rec-open, #voice-add, #voice-start, #loop31,
  #trial-format, .ab button, .scope-chips button, .view-options button,
  .curve-modes button, .library-footer button
) {
  border-radius: 999px !important;
}
html[data-design] #app header.top :is(#preset-open, #sound-pick),
html[data-design] #app :is(#back-all, .curve-modes button, .library-footer button),
html[data-design] #app #pitch-panel #rich-index button {
  box-shadow: none !important;
}
html[data-design] #app :is(#preset-open, #sound-pick, #back-all, .curve-modes button, .library-footer button):hover:not(:disabled):not([aria-disabled=true]):not([aria-pressed=true]) {
  background-color: var(--tt-soft) !important;
}
html[data-design] #app #curve-bar .curve-modes button[aria-pressed=true] {
  background: var(--tt-ink) !important;
  color: var(--tt-ground) !important;
}
html[data-design] #app #curve-bar .curve-modes button[aria-pressed=true] * {
  color: var(--tt-ground) !important;
}
html[data-design] #app #chords .chord {
  position: relative;
  border: 0 !important;
  border-radius: 25px !important;
  padding: 9px 11px !important;
  box-shadow: none !important;
}
html[data-design] #app #chords .chord:hover,
html[data-design] #app #chords .chord[data-current=true] {
  background: var(--tt-soft) !important;
}
html[data-design] #app #chords.is-live .chord[data-live=true]::after {
  content: "";
  position: absolute;
  top: 13px;
  inset-inline-end: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tt-ink);
  pointer-events: none;
}
html[data-design] #app #pitch-panel .library-tabs button {
  border-radius: 999px !important;
}
html[data-design] #app #pitch-panel .library-tabs button:is([aria-pressed=true], :hover) {
  box-shadow: none !important;
  background: var(--tt-soft) !important;
}
html[data-design] #app #pitch-panel #preset-grid .recipe {
  border-radius: 21px !important;
  box-shadow: none !important;
  padding-block: 6px !important;
}
html[data-design] #app #pitch-panel #preset-grid .recipe::before {
  content: none !important;
}
html[data-design] #app #pitch-panel #preset-grid .recipe:hover:not(.fg-locked):not([aria-pressed=true]) {
  background: var(--tt-soft) !important;
}
html[data-design] #app #pitch-panel #preset-grid .recipe:focus-visible {
  outline-offset: -2px !important;
}
html[data-design] #app #pitch-panel #preset-grid .recipe[aria-pressed=true]:focus-visible {
  outline-color: var(--tt-ground) !important;
}
html[data-design] #app .instrument.product31 :is(#stage, #curve-bar, .delivery, .workspace-tools),
html[data-design] #app #pitch-panel :is(.library-tabs, #rich-index) {
  border-color: transparent !important;
}
html[data-design] #app #stage #score path {
  stroke-linecap: round;
  stroke-linejoin: round;
}
#fg-demo-bar {
  border-color: transparent;
}
html[data-design] body :is(.fg-guide, .fg-buy, .fg-bar-mark, .fg-keep, .fg-toast-more, .fg-tour-row button) {
  border-radius: 999px !important;
}
html[data-design] body :is(.fg-tour, .fg-toast, .fg-lock-box) {
  border-radius: 12px;
}
html[data-design] body .fg-tour-ring {
  border-radius: 14px;
}

@media (min-width: 900px) {
  body { overflow-y: auto; }
  #app { min-width: 0; }
  #fg-demo-bar { box-sizing: border-box; min-height: 52px; }
  .fg-cover {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    justify-items: stretch;
  }
  #fg-cover-art { display: block; height: clamp(275px, 66dvh, 520px); }
}
@media (min-width: 900px) {
  html[data-design] #app .instrument.product31 {
    min-height: 605px;
    height: calc(100dvh - 52px);
  }
}
@media (min-width: 900px) and (max-width: 1160px) {
  #app #pitch-panel { grid-template-columns: minmax(0, 1fr); }
  #app #pitch-panel .library-tabs { flex-wrap: wrap; }
  html[data-design] #app #pitch-panel .library-tabs button {
    padding-inline: 3px !important;
    font-size: 12px !important;
  }
  html[data-design] #app .tools #voice-info {
    flex-shrink: 0;
    white-space: nowrap;
  }
  html[lang=ja][data-design] #app #pitch-panel #preset-grid .recipe {
    grid-template-rows: 18px 36px !important;
  }
  html[lang=ja][data-design] #app #pitch-panel #preset-grid .recipe strong {
    display: block !important;
    -webkit-line-clamp: unset !important;
  }
}
@media (min-width: 1161px) {
  html[data-design] #app #pitch-panel .library-tabs button {
    padding-inline: 7px !important;
  }
}
