:root {
  --blue: #39bff0;
  --red: #ff514a;
  --purple: #bd55f5;
  --orange: #ffa10e;
  --pink: #f6609c;
  --green: #95d955;
  --yellow: #f4e24e;
  --line: #171717;
  --gray-cell: #aaa5a5;
  --muted-tab: #8d8d8d;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  display: grid;
  place-items: start center;
  overflow-x: hidden;
  background: #0f0f0f;
  color: #f7f7f7;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

button {
  font: inherit;
}

button:focus {
  outline: none;
}

button:focus-visible {
  outline: 2px solid rgba(57, 191, 240, 0.72);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.phone-shell {
  width: min(100%, 393px);
  height: 852px;
  min-height: 852px;
  overflow: hidden;
  background: #151515;
}

.screen {
  position: relative;
  height: 852px;
  min-height: 852px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 15%, rgba(255, 255, 255, 0.055), transparent 2px),
    radial-gradient(circle at 70% 8%, rgba(255, 255, 255, 0.05), transparent 1px),
    radial-gradient(circle at 64% 34%, rgba(255, 255, 255, 0.035), transparent 2px),
    linear-gradient(115deg, rgba(255, 255, 255, 0.032), transparent 34%, rgba(255, 255, 255, 0.018) 66%, transparent),
    repeating-linear-gradient(95deg, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(8deg, rgba(0, 0, 0, 0.28) 0 1px, transparent 1px 13px),
    #171717;
}

.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.075) 0.5px, transparent 0.8px),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.018), transparent);
  background-size: 17px 17px, 100% 100%;
  mix-blend-mode: overlay;
  opacity: 0.36;
}

.status-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 19px 35px 0 54px;
}

.status-time {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 18px;
}

.cell-bars {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: end;
  gap: 2px;
  height: 14px;
}

.cell-bars i {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: #fff;
}

.cell-bars i:nth-child(1) { height: 5px; opacity: 0.75; }
.cell-bars i:nth-child(2) { height: 8px; opacity: 0.85; }
.cell-bars i:nth-child(3) { height: 11px; opacity: 0.95; }
.cell-bars i:nth-child(4) { height: 14px; }

.wifi-icon {
  width: 18px;
  height: 13px;
  border: 4px solid #fff;
  border-color: #fff transparent transparent transparent;
  border-radius: 18px 18px 0 0;
  position: relative;
}

.wifi-icon::before,
.wifi-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 12px 12px 0 0;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
}

.wifi-icon::before {
  width: 11px;
  height: 8px;
  top: 3px;
  border-width: 3px;
}

.wifi-icon::after {
  width: 3px;
  height: 3px;
  top: 9px;
  border: 0;
  background: #fff;
  border-radius: 50%;
}

.battery-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 17px;
  border-radius: 5px;
  background: #fff;
  color: #151515;
  font-size: 11px;
  font-weight: 800;
}

.battery-icon::after {
  content: "";
  position: absolute;
  right: -3px;
  width: 2px;
  height: 7px;
  border-radius: 0 2px 2px 0;
  background: #fff;
}

.brand-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 61px;
  padding: 19px 36px 15px 35px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.82);
}

.brand-mark {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(
    var(--blue) 0 52deg,
    #272727 52deg 95deg,
    var(--yellow) 95deg 142deg,
    var(--orange) 142deg 184deg,
    var(--red) 184deg 228deg,
    var(--purple) 228deg 282deg,
    var(--pink) 282deg 318deg,
    var(--green) 318deg 360deg
  );
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #171717;
}

.brand-copy {
  margin-left: -1px;
  transform: translateY(1px);
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.78);
}

.help-button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid var(--blue);
  border-radius: 50%;
  color: var(--blue);
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  line-height: 19px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.circle-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 100px;
  min-height: 715px;
  padding-bottom: 112px;
}

.scale-label {
  margin: 0;
  font-weight: 400;
  color: #fff;
  text-align: center;
  letter-spacing: 0;
}

.major-title {
  font-size: 17px;
  line-height: 20px;
  margin-bottom: 13px;
}

.degree-row {
  display: grid;
  grid-template-columns: repeat(7, 26px);
  gap: 12px;
  justify-content: center;
}

.degree-row span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--degree-color);
  color: #050505;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.wheel-wrap {
  width: min(87%, 340px);
  height: min(87vw, 340px);
  margin-top: 19px;
  margin-bottom: 18px;
}

.circle-wheel {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
}

.wheel-cell {
  stroke: var(--line);
  stroke-width: 4.2;
  stroke-linejoin: round;
  transition: fill 420ms cubic-bezier(0.22, 1, 0.36, 1), filter 420ms ease, opacity 420ms ease;
}

.circle-wheel.is-key-changing .wheel-cell {
  filter: saturate(1.08) brightness(1.02);
}

.wheel-rim {
  fill: none;
  stroke: #777;
  stroke-width: 7;
  opacity: 0.88;
}

.wheel-label {
  pointer-events: none;
  fill: #141414;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  text-anchor: middle;
  dominant-baseline: middle;
  letter-spacing: 0;
}

.wheel-label.outer {
  font-size: 37px;
}

.wheel-label.middle {
  font-size: 27px;
}

.wheel-label.inner {
  font-size: 15px;
}

.wheel-label .label-suffix {
  font-size: 0.9em;
}

@media (prefers-reduced-motion: reduce) {
  .wheel-cell {
    transition: none;
  }
}

.center-hole {
  fill: #171717;
  stroke: var(--line);
  stroke-width: 4.2;
}

.minor-degrees {
  margin-top: 0;
}

.minor-title {
  margin-top: 12px;
  font-size: 18px;
  line-height: 22px;
}

.tutorial-link {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 17px;
  line-height: 22px;
  font-weight: 400;
}

.placeholder-panel {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 650px;
  padding: 120px 32px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 28px;
}

.view-chords {
  position: relative;
  z-index: 1;
  height: 743px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.view-chords::-webkit-scrollbar {
  display: none;
}

.chords-shell {
  min-height: 100%;
  padding-bottom: 112px;
}

.chord-selector {
  padding: 13px 35px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chord-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.mode-option,
.key-button,
.chord-play {
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0;
}

.mode-option {
  display: grid;
  place-items: center;
  min-width: 70px;
  height: 43px;
  border: 3px solid transparent;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.93);
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

.mode-option.is-selected {
  border-color: var(--blue);
}

.key-picker {
  display: grid;
  grid-template-columns: repeat(6, 44px);
  justify-content: center;
  gap: 8px 6px;
  margin-top: 14px;
}

.key-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 35px;
  border: 3px solid transparent;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 29px;
  font-weight: 300;
  line-height: 1;
}

.key-button.is-long-key {
  font-size: 24px;
}

.key-button.is-selected {
  border-color: var(--blue);
}

.chord-grid {
  display: grid;
  grid-template-columns: repeat(2, 132px);
  justify-content: space-between;
  gap: 0 35px;
  padding: 22px 47px 122px;
}

.chord-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
}

.string-markers {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  width: 132px;
  height: 27px;
  align-items: end;
  margin-bottom: 3px;
}

.string-marker {
  display: grid;
  place-items: center;
  width: 100%;
  height: 27px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 34px;
  font-weight: 200;
  line-height: 0.75;
}

.string-marker.is-empty {
  color: transparent;
}

.chord-fretboard {
  position: relative;
  width: 132px;
  height: 132px;
  overflow: visible;
  border: 2px solid rgba(255, 255, 255, 0.86);
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.86) 2px, transparent 2px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.86) 2px, transparent 2px);
  background-size: 20% 100%, 100% 20%;
}

.finger-bar {
  position: absolute;
  z-index: 1;
  height: 14px;
  border-radius: 999px;
  background: var(--blue);
  transform: translateY(-50%);
}

.finger-bar.is-arc {
  height: 20px;
  border-top: 5px solid var(--blue);
  border-radius: 999px 999px 0 0;
  background: transparent;
}

.finger-dot {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue);
  color: #141414;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.fret-label {
  position: absolute;
  z-index: 4;
  left: 7px;
  top: 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--pink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72);
}

.fret-label.is-stacked {
  top: 6px;
  left: 5px;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  font-size: 12px;
  line-height: 0.92;
}

.fret-label.is-after-left-dot {
  left: 39px;
}

.fret-label.is-center {
  left: 42px;
}

.chord-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  height: 36px;
  margin-top: 11px;
  color: #fff;
  white-space: nowrap;
}

.chord-name {
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
}

.chord-caption.has-long-name .chord-name {
  font-size: 21px;
}

.chord-caption.has-long-name .chord-degree {
  margin-left: 7px;
  font-size: 23px;
}

.chord-caption.has-long-name .chord-play {
  width: 28px;
  height: 28px;
  margin-left: 8px;
  transform: scale(0.9);
}

.chord-degree {
  margin-left: 13px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 27px;
  font-weight: 300;
  line-height: 1;
}

.chord-play {
  position: relative;
  width: 31px;
  height: 31px;
  margin-left: 16px;
}

.chord-play::before,
.chord-play::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.chord-play::before {
  left: 4px;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 23px solid var(--blue);
}

.chord-play::after {
  left: 8px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 15px solid #171717;
}

.tab-bar {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  height: 93px;
  padding: 10px 44px 13px;
  background: rgba(35, 35, 35, 0.92);
}

.tab-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--muted-tab);
  padding: 0;
  font-size: 12px;
  font-weight: 500;
}

.tab-button:focus-visible {
  outline: none;
}

.tab-button.is-active {
  color: var(--blue);
}

.tab-icon {
  width: 29px;
  height: 29px;
  display: block;
  position: relative;
}

.circle-tab-icon {
  border-radius: 50%;
  background: conic-gradient(
    var(--blue) 0 45deg,
    transparent 45deg 78deg,
    var(--blue) 78deg 126deg,
    transparent 126deg 160deg,
    var(--blue) 160deg 216deg,
    transparent 216deg 250deg,
    var(--blue) 250deg 312deg,
    transparent 312deg 360deg
  );
}

.circle-tab-icon::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #2a2a2a;
}

.tab-button:not(.is-active) .circle-tab-icon {
  filter: grayscale(1);
  opacity: 0.85;
}

.chord-tab-icon {
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
}

.chord-tab-icon::before,
.chord-tab-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.chord-tab-icon::before {
  left: 9px;
  top: 0;
  bottom: 0;
  width: 1px;
  box-shadow: 9px 0 0 currentColor;
}

.chord-tab-icon::after {
  left: 0;
  right: 0;
  top: 9px;
  height: 1px;
  box-shadow: 0 9px 0 currentColor;
}

.chord-tab-icon i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.chord-tab-icon i:nth-child(1) { left: 5px; top: 4px; }
.chord-tab-icon i:nth-child(2) { left: 14px; top: 4px; }
.chord-tab-icon i:nth-child(3) { left: 14px; top: 13px; }
.chord-tab-icon i:nth-child(4) { left: 23px; top: 13px; }
.chord-tab-icon i:nth-child(5) { left: 5px; top: 22px; }
.chord-tab-icon i:nth-child(6) { left: 23px; top: 22px; }

.tutorial-overlay[hidden] {
  display: none;
}

.tutorial-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.72);
}

.tutorial-panel {
  width: 100%;
  padding: 26px 24px 22px;
  background: #202020;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
}

.tutorial-panel h2 {
  margin: 0 0 22px;
  color: #fff;
  text-align: center;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
}

.tutorial-panel p {
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.38;
}

.tutorial-close {
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 20px;
}

@media (max-width: 360px) {
  .brand-bar {
    padding-inline: 28px;
  }

  .circle-stage {
    padding-top: 96px;
  }

  .degree-row {
    grid-template-columns: repeat(7, 24px);
    gap: 9px;
  }

  .degree-row span {
    width: 24px;
    height: 24px;
    font-size: 16px;
  }

  .chord-selector {
    padding-inline: 26px;
  }

  .key-picker {
    grid-template-columns: repeat(6, 39px);
    gap: 16px 4px;
  }

  .key-button {
    width: 39px;
    font-size: 26px;
  }

  .chord-grid {
    grid-template-columns: repeat(2, 124px);
    gap: 8px 34px;
    padding-inline: 36px;
  }

  .string-markers,
  .chord-fretboard,
  .chord-caption {
    width: 124px;
    min-width: 124px;
  }

  .chord-fretboard {
    height: 124px;
  }
}
