:root {
  --pt-bg: #0b1012;
  --pt-surface: #12191c;
  --pt-surface-2: #182126;
  --pt-line: #2c393f;
  --pt-text: #f0f4f5;
  --pt-muted: #9eabb1;
  --pt-cyan: #42c5dd;
  --pt-gold: #e1b75e;
}

body.is-embedded {
  color: var(--pt-text) !important;
  background: var(--pt-bg) !important;
}

body.is-embedded main {
  width: min(100%, 1120px) !important;
  max-width: 1120px !important;
  min-height: 100% !important;
  margin: 0 auto !important;
  padding: 16px 20px 34px !important;
  gap: 14px !important;
  overflow-x: hidden;
}

body.is-embedded .tuner-setup-panel {
  border-color: var(--pt-line) !important;
  border-radius: 7px !important;
  background: var(--pt-surface) !important;
  box-shadow: none !important;
  padding: 14px !important;
}

body.is-embedded .tuner-setup-panel > .flex:first-child {
  min-height: 30px;
  margin-bottom: 10px !important;
}

body.is-embedded .tuner-setup-panel .tab-mode-btn {
  min-height: 52px;
  border-radius: 5px !important;
  box-shadow: none !important;
  flex-direction: row !important;
  justify-content: flex-start !important;
  padding: 10px 13px !important;
  line-height: 1.25;
}

body.is-embedded .tuner-setup-panel .tab-mode-btn i { width: 22px; text-align: center; }

body.is-embedded #sub-instrument-bar {
  flex-wrap: wrap;
  overflow: visible !important;
  gap: 7px !important;
  padding-bottom: 0 !important;
}

body.is-embedded #sub-instrument-bar .inst-btn {
  min-height: 36px;
  border-radius: 5px !important;
  padding: 7px 10px !important;
}

body.is-embedded #sub-instrument-bar:not(.is-expanded) .inst-btn:is(
  [data-inst="guitar7"], [data-inst="bass5"], [data-inst="bass6"],
  [data-inst="mandolin"], [data-inst="banjo"], [data-inst="violin"], [data-inst="cello"]
):not(.active) { display: none !important; }

.mz-more-instruments {
  min-height: 36px;
  border: 1px solid #46545a;
  border-radius: 5px;
  background: #20292d;
  color: #d7e0e3;
  padding: 7px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.mz-instrument-select-wrap { display: none; }

body.is-embedded #tuning-select-bar {
  min-height: 48px;
  margin-top: 10px !important;
  padding-top: 10px !important;
}

body.is-embedded #tuning-dropdown {
  min-height: 38px;
  min-width: min(340px, 50vw);
  border-radius: 5px !important;
  border-color: #46545a !important;
  background: #1c2529 !important;
}

body.is-embedded #view-beginner,
body.is-embedded #view-single,
body.is-embedded #view-poly,
body.is-embedded #view-12string {
  border-radius: 7px !important;
  border-color: var(--pt-line) !important;
  background: #0e1518 !important;
  box-shadow: none !important;
}

body.is-embedded #view-beginner { padding: 18px !important; }
body.is-embedded #view-beginner > .text-center { margin-bottom: 14px !important; }
body.is-embedded #view-beginner .rounded-full { border-radius: 5px !important; }
body.is-embedded #view-beginner .max-w-md { border-radius: 7px !important; background: var(--pt-surface) !important; }
body.is-embedded .headstock-peg { border-radius: 6px !important; }

body.is-embedded #mib-consent-banner {
  left: 14px !important;
  right: 14px !important;
  bottom: 14px !important;
  border: 1px solid #6b572c !important;
  border-radius: 7px !important;
  padding: 12px 14px !important;
  box-shadow: 0 14px 50px rgba(0,0,0,.58) !important;
}

@media (max-width: 720px) {
  body.is-embedded main {
    padding: 9px 10px 24px !important;
    gap: 9px !important;
  }

  body.is-embedded .tuner-setup-panel { padding: 10px !important; }
  body.is-embedded .tuner-setup-panel > .flex:first-child { margin-bottom: 8px !important; }
  body.is-embedded .tuner-setup-panel > .grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.is-embedded .tuner-setup-panel .tab-mode-btn {
    min-height: 46px;
    padding: 7px 9px !important;
    font-size: 11px !important;
  }

  body.is-embedded #sub-instrument-bar { display: none !important; }
  .mz-instrument-select-wrap {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid var(--pt-line);
  }
  .mz-instrument-select-wrap label { color: var(--pt-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
  .mz-instrument-select-wrap select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #46545a;
    border-radius: 5px;
    background: #1b2529;
    color: var(--pt-text);
    padding: 8px 10px;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
  }

  body.is-embedded #tuning-select-bar {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 6px;
    min-height: 0;
  }
  body.is-embedded #tuning-select-bar.hidden { display: none !important; }
  body.is-embedded #tuning-dropdown { width: 100%; min-width: 0; min-height: 42px; }
  body.is-embedded #view-beginner { padding: 12px 9px !important; }
  body.is-embedded #view-beginner h3 { font-size: 18px !important; }
  body.is-embedded #view-beginner > .text-center .flex { gap: 5px !important; }
  body.is-embedded #view-beginner > .text-center .flex > span,
  body.is-embedded #view-beginner > .text-center .flex > label { padding: 5px 7px !important; font-size: 10px !important; }
  body.is-embedded #view-beginner .max-w-md > .w-full.flex { gap: 5px !important; padding-left: 0 !important; padding-right: 0 !important; }
  body.is-embedded #beg-headstock-left,
  body.is-embedded #beg-headstock-right { flex: 1 1 0 !important; min-width: 0 !important; gap: 9px !important; }
  body.is-embedded #beg-headstock-left + div { flex: 0 0 44px !important; width: 44px !important; min-width: 44px !important; margin-left: 4px !important; margin-right: 4px !important; }
  body.is-embedded #beg-headstock-left .headstock-peg,
  body.is-embedded #beg-headstock-right .headstock-peg { width: 100% !important; min-width: 0 !important; gap: 4px !important; padding: 5px !important; }
  body.is-embedded .headstock-peg .peg-circle { width: 27px !important; height: 27px !important; }
  body.is-embedded .headstock-peg .font-mono { display: none !important; }
  body.is-embedded #mib-floating-feedback-btn { display: none !important; }
  body.is-embedded #mib-consent-banner { left: 8px !important; right: 8px !important; bottom: 8px !important; padding: 10px !important; }
}

@media (prefers-reduced-motion: reduce) {
  body.is-embedded *, body.is-embedded *::before, body.is-embedded *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

html, body { background: #0b0f11 !important; color-scheme: dark; }
html.is-embedded body.is-embedded { background: #0b0f11 !important; }
body.is-embedded { min-width: 0; min-height: 100dvh; }
body.is-embedded main { width: 100% !important; max-width: none !important; padding: 14px 20px 24px !important; gap: 12px !important; }
body.is-embedded main > * { min-width: 0; flex-shrink: 0; }
.tuner-setup-panel, #view-beginner, #view-single, #view-poly, #view-12string { box-shadow: none !important; background-image: none !important; }
body.is-embedded .tuner-setup-panel { border: 0 !important; border-bottom: 1px solid var(--pt-line) !important; border-radius: 0 !important; padding: 0 0 14px !important; background: transparent !important; }
body.is-embedded .tuner-setup-panel > .flex:first-child { min-height: 24px; margin-bottom: 8px !important; }
body.is-embedded .tab-mode-btn { min-height: 42px !important; justify-content: center !important; font-size: 13px !important; border: 1px solid var(--pt-line) !important; background: #182024 !important; color: var(--pt-muted) !important; }
body.is-embedded .tab-mode-btn i { color: inherit !important; }
body.is-embedded .tab-mode-btn.active { background: #30291b !important; border-color: #957844 !important; color: #ecc578 !important; }
#sub-instrument-bar { display: none !important; }
.pt-selectors { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: end; gap: 14px; margin-top: 12px; }
.mz-instrument-select-wrap, body.is-embedded .mz-instrument-select-wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 0; margin: 0; border: 0; min-width: 0; }
.mz-instrument-select-wrap label { font-size: 12px; color: var(--pt-muted); text-transform: none; font-weight: 600; }
.mz-instrument-select-wrap select, body.is-embedded #tuning-dropdown { min-width: 0; width: 100%; min-height: 40px; background: #182024; border: 1px solid #3a484f; color: var(--pt-text); padding: 8px 10px; border-radius: 5px; font-size: 13px; }
body.is-embedded #tuning-select-bar { display: grid !important; grid-template-columns: auto minmax(0, 1fr); gap: 10px; border: 0 !important; padding: 0 !important; margin: 0 !important; min-height: 40px; }
body.is-embedded #tuning-select-bar.hidden { display: none !important; }
.pt-transport { display: flex; align-items: center; justify-content: space-between !important; gap: 16px; min-height: 44px; }
#pt-mic-status { font-size: 13px; color: var(--pt-muted); line-height: 1.4; }
#btn-toggle-mic { min-height: 42px; flex-shrink: 0; padding: 10px 18px !important; border-radius: 5px !important; background: #42b8ca !important; color: #071014 !important; box-shadow: none !important; text-transform: none; font-size: 13px !important; letter-spacing: 0 !important; }
#btn-toggle-mic[aria-pressed="true"] { background: #a94148 !important; color: white !important; }
#btn-toggle-mic:disabled { opacity: .55; }
body.is-embedded #view-beginner, body.is-embedded #view-single, body.is-embedded #view-poly, body.is-embedded #view-12string { border: 0 !important; background: #111719 !important; padding: 16px !important; }
body.is-embedded #view-beginner > .text-center { margin-bottom: 16px !important; }
body.is-embedded #view-beginner h3 { font-size: 20px !important; font-weight: 650 !important; }
body.is-embedded #view-beginner > .text-center label { border: 0 !important; background: transparent !important; padding: 2px 8px !important; }
body.is-embedded .pt-tuning-stage { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(260px, .85fr); align-items: center !important; gap: 26px; width: 100%; max-width: 1050px !important; padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
.pt-headstock { max-width: 470px; margin-inline: auto; min-width: 0; }
body.is-embedded .pt-headstock { padding: 0 !important; }
body.is-embedded #beg-headstock-left, body.is-embedded #beg-headstock-right { min-width: 0; gap: 12px !important; }
body.is-embedded #beg-headstock-left + div { height: 204px !important; flex: 0 0 60px; width: 60px !important; min-width: 60px; margin: 0 10px !important; border: 1px solid #3d494c !important; border-radius: 24px 24px 8px 8px !important; background: #1c2427 !important; box-shadow: none !important; }
body.is-embedded .headstock-peg { min-height: 48px; width: 100%; min-width: 0; animation: none !important; transform: none !important; filter: none !important; box-shadow: none !important; background: #1b2327 !important; border: 1px solid #39474d !important; border-radius: 5px !important; padding: 8px !important; }
body.is-embedded .headstock-peg.active { border-color: #bb954b !important; background: #302a1d !important; }
body.is-embedded .headstock-peg .peg-circle { width: 27px !important; height: 27px !important; flex-shrink: 0; box-shadow: none !important; border-radius: 4px !important; }
body.is-embedded .headstock-peg .truncate { display: none; }
body.is-embedded .headstock-peg .font-mono { font-size: 9px !important; }
body.is-embedded #beg-instruction-card { margin: 0 !important; padding: 22px 0 22px 24px !important; border: 0 !important; border-left: 1px solid var(--pt-line) !important; border-radius: 0 !important; background: transparent !important; min-width: 0; animation: none !important; box-shadow: none !important; }
#beg-action-icon .animate-spin, #beg-action-icon .animate-bounce { animation: none !important; }
#beg-action-head { font-size: 18px !important; font-weight: 650 !important; line-height: 1.4; }
#beg-btn-prev, #beg-btn-next, #beg-btn-play-tone { min-height: 38px; font-size: 12px; border-radius: 5px !important; background: #1d282d !important; color: var(--pt-text) !important; border: 1px solid var(--pt-line) !important; box-shadow: none !important; }
.pt-details { border-top: 1px solid var(--pt-line); color: var(--pt-text); background: transparent; }
.pt-details summary { min-height: 40px; padding: 10px 0; cursor: pointer; font-size: 13px; color: var(--pt-muted); }
.pt-details > div { background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 12px 0 !important; }
body.is-embedded #mib-floating-feedback-btn, body.is-embedded #mib-version-badge, body.is-embedded footer { display: none !important; }
body.is-embedded .tracking-wider, body.is-embedded .tracking-widest, body.is-embedded .tracking-tight { letter-spacing: 0 !important; }
@media (max-width: 720px) {
  body.is-embedded main { padding: 10px 12px 20px !important; gap: 10px !important; }
  body.is-embedded .tuner-setup-panel > .grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 5px !important; }
  body.is-embedded .tuner-setup-panel .tab-mode-btn { flex-direction: column !important; gap: 4px !important; min-height: 48px !important; padding: 6px 4px !important; font-size: 11px !important; }
  .pt-selectors { grid-template-columns: 1fr; gap: 10px; }
  .mz-instrument-select-wrap, body.is-embedded .mz-instrument-select-wrap, body.is-embedded #tuning-select-bar { grid-template-columns: 1fr; gap: 5px; }
  .mz-instrument-select-wrap select, body.is-embedded #tuning-dropdown { min-height: 40px; font-size: 14px !important; }
  .mz-instrument-select-wrap select, body.is-embedded #tuning-dropdown {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.is-embedded .pt-tuning-stage { grid-template-columns: 1fr; gap: 10px; }
  body.is-embedded #view-beginner { padding: 14px 8px !important; }
  body.is-embedded #view-beginner h3 { font-size: 18px !important; }
  body.is-embedded #view-beginner > .text-center { margin-bottom: 8px !important; }
  body.is-embedded #view-beginner > .text-center .flex > label { font-size: 11px !important; }
  body.is-embedded .pt-headstock { max-width: 380px; }
  body.is-embedded #beg-headstock-left + div { height: 170px !important; flex-basis: 44px; width: 44px !important; min-width: 44px; }
  body.is-embedded #beg-headstock-left, body.is-embedded #beg-headstock-right { gap: 8px !important; }
  body.is-embedded #beg-instruction-card { padding: 12px 0 0 !important; border-left: 0 !important; border-top: 1px solid var(--pt-line) !important; }
  #beg-action-body { font-size: 12px; }
  #beg-action-head { font-size: 16px !important; }
  #pt-mic-status { font-size: 12px; }
  #btn-toggle-mic { padding: 10px 12px !important; font-size: 12px !important; }
  .pt-transport { gap: 10px; }
}
