@font-face {
  font-family: Nunito;
  src: url("/assets/fonts/nunito-latin.woff2");
}
@font-face {
  font-family: Arabic;
  src: url("/assets/fonts/noto-sans-arabic-400.woff2");
}
* {
  box-sizing: border-box;
}
:root {
  color-scheme: light;
  --bg: #f4f9fc;
  --card: #fff;
  --ink: #304956;
  --muted: #607884;
  --line: #dce8ee;
  --sky: #54c4e9;
  --blue: #13789b;
  --soft: #e4f6fc;
  --warn: #9a580a;
  --danger: #b23538;
  --shadow: #dce7ed;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e202b;
  --card: #162e3b;
  --ink: #e3f3fa;
  --muted: #a3bac6;
  --line: #2d4c5c;
  --sky: #54c4e9;
  --blue: #68d0ef;
  --soft: #203f50;
  --warn: #f2c27b;
  --danger: #ffb4b4;
  --shadow: #091923;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    17px/1.65 Nunito,
    Arabic,
    system-ui,
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  min-height: 46px;
  padding: 10px 19px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}
button.primary {
  background: var(--sky);
  color: #103d50;
  box-shadow: 0 5px 0 #258fb0;
  border-color: transparent;
  font-weight: 800;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
button.danger {
  color: var(--danger);
}
header.top {
  max-width: 1220px;
  margin: auto;
  padding: 24px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-weight: 800;
  color: var(--blue);
  text-decoration: none;
}
.toolbar,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.wrap {
  max-width: 1160px;
  margin: auto;
  padding: 20px 24px 80px;
}
.hero {
  max-width: 780px;
  margin: 30px auto 36px;
  text-align: center;
}
.eyebrow {
  color: var(--blue);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.08em;
}
h1 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.2;
  margin: 16px 0;
}
h2 {
  font-size: 24px;
  line-height: 1.4;
  margin: 0 0 15px;
}
h3 {
  font-size: 19px;
}
p {
  margin: 10px 0 20px;
}
.muted,
small {
  color: var(--muted);
}
.card {
  background: var(--card);
  padding: 28px;
  border: 2px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 4px 0 var(--shadow);
  margin-bottom: 24px;
}
.accent {
  background: var(--soft);
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.studio {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}
.item-list {
  position: sticky;
  top: 15px;
  max-height: 85vh;
  overflow: auto;
}
.item-list button {
  display: block;
  width: 100%;
  margin: 5px 0;
  text-align: start;
  font-size: 13px;
  padding: 8px 10px;
}
.item-list button[aria-current="true"] {
  border: 2px solid var(--blue);
  background: var(--soft);
}
label {
  display: block;
  margin: 12px 0;
}
input:not([type="checkbox"]),
textarea,
select {
  width: 100%;
  padding: 12px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-inline-end: 10px;
  vertical-align: middle;
}
textarea {
  min-height: 90px;
}
form .actions {
  margin-top: 24px;
}
.instruction {
  font-size: 20px;
}
.code {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  direction: ltr;
  display: inline-block;
  color: var(--blue);
}
.ladder {
  direction: ltr;
  min-width: 390px;
}
.ladder-scroll {
  overflow: auto;
  padding-bottom: 8px;
}
.intervals {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.interval {
  background: var(--soft);
  text-align: center;
  border-radius: 10px;
  padding: 12px 2px;
  font-weight: 800;
}
.interval.quarter {
  background: #e8d1b6;
  color: #513416;
}
.degrees {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  margin: 12px -18px 0;
}
.degree {
  text-align: center;
  padding: 5px 2px;
  border: 2px solid transparent;
  border-radius: 14px;
  line-height: 1.4;
}
.degree.quarter {
  border-color: var(--warn);
}
.degree small {
  display: block;
  font-size: 11px;
}
.degree b {
  font-size: 17px;
}
.jins {
  height: 45px;
  position: relative;
  margin-bottom: 4px;
}
.bracket {
  position: absolute;
  border: 3px solid var(--blue);
  border-bottom: 0;
  text-align: center;
  height: 33px;
  color: var(--blue);
  font-size: 13px;
  line-height: 24px;
}
.bracket.upper {
  top: 20px;
}
.phrase {
  display: flex;
  gap: 6px;
  direction: ltr;
  margin: 18px 0;
}
.phrase span {
  min-width: 20px;
  background: var(--soft);
  padding: 12px 0;
  border-radius: 14px;
  text-align: center;
  font-weight: bold;
}
.meter {
  height: 22px;
  background: var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.meter span {
  display: block;
  height: 100%;
  width: 0;
  background: #35b883;
}
.pitch {
  font-variant-numeric: tabular-nums;
  font-size: 24px;
  direction: ltr;
}
.good {
  color: #249262;
}
.bad {
  color: var(--danger);
}
.status {
  border-inline-start: 4px solid var(--blue);
  padding: 12px;
  background: var(--soft);
  border-radius: 8px;
  margin: 14px 0;
}
.checks {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.check {
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.check.redo {
  color: var(--danger);
}
.check.review,
.check.warning {
  color: var(--warn);
}
audio {
  width: 100%;
  margin: 15px 0;
}
progress {
  width: 100%;
  height: 22px;
}
footer {
  text-align: center;
  padding: 25px;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
.mapping {
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
  overflow-wrap: anywhere;
}
.instructions li {
  margin: 12px 0;
}
.total {
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
canvas {
  max-width: 100%;
  border-radius: 14px;
  background: var(--bg);
}
@media (max-width: 760px) {
  .wrap {
    padding: 10px 14px 45px;
  }
  .grid,
  .studio {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 20px;
    border-radius: 22px;
  }
  .item-list {
    position: static;
    max-height: 190px;
  }
  .hero {
    margin: 18px auto;
  }
  .top .brand {
    font-size: 14px;
  }
  header.top {
    padding: 14px;
  }
  .actions button {
    flex: 1 1 130px;
  }
  .grid {
    gap: 0;
  }
}

.general-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.5rem 0.5rem;
  text-align: center;
}
.general-visual .visual-symbol {
  font-size: 2.5rem;
  color: var(--accent, #0b7798);
}
.playback-error {
  color: #b83232;
  flex-basis: 100%;
}
[data-theme="dark"] .playback-error {
  color: #ffb3b3;
}
