:root {
  --primary: #fe7d15;
  --second: #fd5e48;
  --third: #f2bb1e;
  --heading: #2c2c2c;
  --text: #666c6e;
  --card: #fff;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  font-family: "Source Sans Pro", "Source Sans 3", sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.45;
}

h1, h2, .brand, .name {
  font-family: Montserrat, sans-serif;
  color: var(--heading);
  font-weight: 700;
}

a { color: var(--primary); }

button, .button, input {
  font: inherit;
}

button, .button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.site-header {
  background: #000;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  padding: 0.45rem 1.1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-family: Montserrat, sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
}

.crumb-sep { color: #b5b5b5; }

.site-header a, .brand { color: #fff; text-decoration: none; }

.crumbs [aria-current="page"],
.header-nav a[aria-current="page"] { color: var(--third); }

.brand { display: flex; align-items: center; line-height: 0; }

.logo { height: 32px; width: auto; max-height: 32px; display: block; }

.header-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-left: auto;
}

.header-nav button {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  min-height: 40px;
}

.wrap {
  width: min(48rem, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
}

.narrow { width: min(28rem, calc(100% - 1.5rem)); }

h1 { text-align: center; font-size: 1.8rem; margin: 0.2rem 0 0.4rem; }

.lede { text-align: center; margin-top: 0; }

.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }

.path-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin: 1.1rem 0 0.4rem;
}

.path-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-height: 210px;
  padding: 1rem 0.9rem 1.1rem;
  border-radius: 16px;
  text-decoration: none;
  color: var(--heading);
  background: #fff;
  border: 3px solid #2c2c2c;
  box-shadow: 4px 4px 0 #2c2c2c;
}

.path-card:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #2c2c2c; }

.path-card-study { background: #fff6ee; }

.path-card-cd { background: #fff9e8; }

.cartoon { width: 100%; max-width: 150px; height: auto; }

.path-title {
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--heading);
}

.path-text { text-align: center; color: var(--text); line-height: 1.3; }

@media (max-width: 560px) {
  .path-cards { grid-template-columns: 1fr; }
  .path-card { min-height: 0; }
}

.board-grid {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.board-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 4.6rem;
  padding: 0.65rem 0.7rem;
  background: #fff;
  border: 2px solid #2c2c2c;
  border-top: 4px solid var(--primary);
  border-radius: 12px;
  box-shadow: 2px 2px 0 #2c2c2c;
  text-decoration: none;
  color: var(--heading);
}

.board-card:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 #2c2c2c; }

.board-card .name {
  font-family: Montserrat, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--heading);
}

.board-card .sub { font-size: 0.78rem; line-height: 1.25; color: var(--text); }

@media (max-width: 640px) {
  .board-grid { grid-template-columns: repeat(2, 1fr); }
}

.card-links a { font-weight: 600; }

.login { display: grid; gap: 0.8rem; margin-top: 1rem; }

.login label, .search-label { display: grid; gap: 0.3rem; font-weight: 600; color: var(--heading); }

input[type="search"], input[type="password"], input[type="text"], .login input {
  min-height: 44px;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  background: #fff;
  color: #222;
}

.error {
  background: #fff1ee;
  color: #9e2b1f;
  border: 1px solid #f0c2bb;
  padding: 0.7rem 0.8rem;
  border-radius: 6px;
}

.note, .save-status { text-align: center; }

.search-status { min-height: 1.2rem; margin: 0.35rem 0 0; color: var(--text); }

.cd { margin-top: 2rem; }

.track-list, .tech-list { list-style: none; padding: 0; margin: 0.8rem 0 0; }

.tech-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.6rem 0 1.5rem;
}

.track-list button {
  width: 100%;
  text-align: left;
  background: #fff;
  color: var(--heading);
  border: 2px solid #2c2c2c;
  border-radius: 12px;
  margin-bottom: 0.45rem;
}

.track-list button.current, .tech.current .tech-card { outline: 3px solid var(--third); }

.tech { display: flex; min-width: 0; margin: 0; }

.tech[hidden] { display: none; }

.tech-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-height: 4.6rem;
  padding: 0.65rem 0.7rem;
  background: #fff;
  color: var(--heading);
  border: 2px solid #2c2c2c;
  border-top: 4px solid var(--primary);
  border-radius: 12px;
  box-shadow: 2px 2px 0 #2c2c2c;
  text-decoration: none;
}

a.tech-card { cursor: pointer; }

a.tech-card:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 #2c2c2c; }

.tech .num, .track-list .num {
  font-variant-numeric: tabular-nums;
  color: var(--primary);
  font-weight: 700;
}

.tech .num { margin-right: 0.35rem; }

.tech-name, .tech-desc { margin: 0; }

.tech-name {
  font-family: Montserrat, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--heading);
}

.blue-stars {
  color: #1a6fd4;
  margin-left: 0.3rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.star-play {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
  margin: 0.9rem 0 0;
}

.star-play-title {
  margin: 0;
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  color: var(--heading);
}

.star-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  font-weight: 600;
  color: var(--heading);
}

.star-choice input { width: 1.2rem; height: 1.2rem; }

.star-choice .blue-stars { margin-left: 0.15rem; }

.tech-desc { font-size: 0.78rem; line-height: 1.25; color: var(--text); }

@media (max-width: 640px) {
  .tech-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.audio-section {
  position: sticky;
  top: 0.5rem;
  z-index: 3;
  margin: 1rem 0;
  padding: 0.8rem 0.9rem 0.9rem;
  background: #fff;
  border: 2px solid #2c2c2c;
  border-top: 4px solid var(--primary);
  border-radius: 12px;
  scroll-margin-top: 0.6rem;
}

.audio-section h2 { margin: 0; text-align: left; font-size: 1.3rem; }

.chooser {
  border: 0;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  gap: 0.45rem;
}

.chooser legend {
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  color: var(--heading);
  padding: 0;
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 48px;
  background: #fff;
  border: 2px solid #2c2c2c;
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  padding: 0.4rem 0.75rem;
}

.choice a { flex: 1; font-weight: 600; color: var(--heading); text-decoration: none; }

.answer h2 a { color: inherit; }

.choice input { width: 1.2rem; height: 1.2rem; }

.answer {
  background: #fff;
  border: 2px solid #2c2c2c;
  border-top: 4px solid var(--primary);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-top: 1rem;
}

.kicker { margin: 0; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.85rem; }

.answer h2 { margin: 0.2rem 0 0.6rem; text-align: left; }

.answer-desc, #answer-desc, #playing-desc {
  margin: 0 0 0.55rem;
  color: var(--text);
}

.answer ol, .playing-detail ol {
  margin: 0.15rem 0 0;
  padding-left: 1.25rem;
  list-style: decimal;
}

.answer li, .playing-detail li {
  margin: 0.2rem 0;
  line-height: 1.35;
}

.playing-detail {
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px solid #e6e6e6;
}

.playing-detail[hidden] { display: none; }

.playing-detail h3 {
  margin: 0 0 0.35rem;
  text-align: left;
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  color: var(--heading);
  font-size: 1.15rem;
}

.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  background: #fff;
  border-top: 3px solid var(--primary);
  padding: 0.55rem 0.8rem calc(0.55rem + env(safe-area-inset-bottom));
}

body.has-player { padding-bottom: 6.5rem; }

audio { width: 100%; height: 44px; }

#install { margin: 0.8rem auto 0; display: flex; }

#install[hidden] { display: none; }
