﻿@font-face {
  font-family: "Spartan MB";
  src: url("assets/fonts/spartan-mb/SpartanMB-Thin.otf") format("opentype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Spartan MB";
  src: url("assets/fonts/spartan-mb/SpartanMB-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
#sidebar-block-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #333;
}
@font-face {
  font-family: "Spartan MB";
  src: url("assets/fonts/spartan-mb/SpartanMB-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Spartan MB";
  src: url("assets/fonts/spartan-mb/SpartanMB-SemiBold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
.checkpoint {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
@font-face {
  font-family: "Spartan MB";
  src: url("assets/fonts/spartan-mb/SpartanMB-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
#bpmInput {
  padding: 0.5rem;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
  margin-left: auto;
}

#bpmInput:focus {
  outline: none;
  border-color: #333;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}
@font-face {
  font-family: "Spartan MB";
  src: url("assets/fonts/spartan-mb/SpartanMB-ExtraBold.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Spartan MB";
  src: url("assets/fonts/spartan-mb/SpartanMB-Black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

* {
  -webkit-user-select: none; /* Chrome, Safari, and Capacitor (iOS) */
  user-select: none;
  
  /* Disables the "copy/paste" context menu on iOS */
  -webkit-touch-callout: none; 
}

/* Re-enable selection for specific elements like inputs or text areas */
input, textarea, [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

.app-root-selector {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.42), transparent 36%),
    rgba(25, 18, 17, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.app-root-selector-card {
  width: min(720px, 100%);
  background: rgba(255, 252, 251, 0.98);
  border: 1px solid rgba(58, 31, 26, 0.08);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(38, 14, 10, 0.26);
  padding: 1.6rem;
  display: grid;
  gap: 0.95rem;
}

.app-root-selector-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(255, 82, 61, 0.24);
}

.app-root-selector-eyebrow,
.theory-root-eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff523d;
}

.app-root-selector-card h1,
.theory-root-header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  line-height: 1.02;
  color: #231917;
}

.app-root-selector-copy {
  margin: 0;
  color: #6c5550;
  font-size: 0.98rem;
  line-height: 1.45;
}

.app-root-selector-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.app-root-choice {
  border: 1px solid rgba(58, 31, 26, 0.08);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 245, 243, 0.98));
  min-height: 180px;
  padding: 1rem;
  text-align: left;
  display: grid;
  align-content: start;
  gap: 0.4rem;
  box-shadow: 0 14px 28px rgba(36, 15, 12, 0.08);
  position: relative;
  overflow: hidden;
}

.app-root-choice-kicker,
.theory-card-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff523d;
}

.app-root-choice strong,
.theory-card h3 {
  font-size: 1.15rem;
  line-height: 1.1;
  color: #231917;
}

.app-root-choice small,
.theory-card p,
.theory-card li {
  color: #6f5954;
  font-size: 0.88rem;
  line-height: 1.45;
}

.app-root-choice-practice {
  outline: 2px solid rgba(255, 82, 61, 0.14);
}

.app-root-choice.is-coming-soon {
  filter: saturate(0.72);
}

.app-root-choice-badge {
  position: absolute;
  top: 0.95rem;
  right: 0.95rem;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  background: rgba(35, 25, 23, 0.9);
  color: #fff7f3;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.app-root-choice-theory {
  background: linear-gradient(180deg, rgba(36, 28, 26, 0.98), rgba(25, 19, 18, 0.98));
}

.app-root-choice-theory strong,
.app-root-choice-theory small {
  color: #fff4f0;
}

.theory-root {
  min-height: 100dvh;
  padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1rem calc(env(safe-area-inset-bottom, 0px) + 1rem);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.28), transparent 38%),
    linear-gradient(180deg, #ff6a57 0%, #ff523d 100%);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.theory-root.is-hub {
  padding: 0 0 calc(env(safe-area-inset-bottom, 0px) + 0.8rem);
}

.theory-root.is-screen {
  padding: calc(env(safe-area-inset-top, 0px) + 0.55rem) 0.45rem calc(env(safe-area-inset-bottom, 0px) + 0.8rem);
}

.theory-root-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  background: rgba(255, 251, 250, 0.98);
  border-radius: 28px;
  padding: 1.2rem;
  box-shadow: 0 28px 70px rgba(66, 17, 10, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.44);
  display: grid;
  gap: 1rem;
}

.theory-root-header {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.theory-root-header-actions {
  margin-left: auto;
  display: none;
  align-items: center;
  gap: 0.2rem;
}

.theory-root-header-icon {
  border: 0;
  background: transparent;
  color: currentColor;
  min-width: 30px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.theory-root-header-icon svg {
  width: 18px;
  height: 18px;
}

.theory-root-back {
  border: 1px solid rgba(58, 31, 26, 0.08);
  background: #fff;
  color: #231917;
  border-radius: 14px;
  padding: 0.75rem 0.95rem;
  font-weight: 800;
}

.theory-root-header-copy {
  display: grid;
  gap: 0.25rem;
}

.theory-root-subcopy {
  margin: 0;
  color: #6f5954;
  font-size: 0.94rem;
  line-height: 1.45;
}

.theory-overview {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 0.9rem;
}

.theory-overview-card {
  border: 1px solid rgba(58, 31, 26, 0.08);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 246, 244, 0.98));
  padding: 1rem;
  display: grid;
  gap: 0.45rem;
  box-shadow: 0 14px 24px rgba(38, 18, 14, 0.06);
}

.theory-overview-card strong {
  font-size: 1.9rem;
  line-height: 1;
  color: #231917;
}

.theory-overview-card-brand {
  background: linear-gradient(180deg, rgba(37, 28, 26, 0.98), rgba(24, 18, 16, 0.98));
}

.theory-overview-card-brand h3,
.theory-overview-card-brand p {
  color: #fff4f0;
}

.theory-workspace {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 0.9rem;
}

.theory-root-shell.is-hub .theory-overview {
  display: none;
}

.theory-root-shell.is-hub {
  width: 100%;
  max-width: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  gap: 0.28rem;
}

.theory-root-shell.is-hub .theory-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.theory-root-shell.is-hub .theory-content-panel {
  display: none;
}

.theory-root-shell.is-hub .theory-nav-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.theory-root-shell.is-hub .theory-root-header {
  margin: 0;
  padding: calc(env(safe-area-inset-top, 0px) + 0.9rem) 1rem 0.82rem;
  background: #58b57f;
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.65rem;
}

.theory-root-shell.is-hub .theory-root-back {
  display: none;
}

.theory-root-shell.is-hub .theory-root-header-actions {
  display: flex;
  justify-self: end;
}

.theory-root-shell.is-hub .theory-root-header-icon {
  color: #fff;
  opacity: 0.96;
}

.theory-root-shell.is-hub .theory-root-header-copy {
  min-width: 0;
  width: 100%;
  text-align: left !important;
  justify-items: start;
  align-items: start;
}

.theory-root-shell.is-hub .theory-root-eyebrow,
.theory-root-shell.is-hub .theory-root-subcopy,
.theory-root-shell.is-hub .theory-nav-heading {
  display: none;
}

.theory-root-shell.is-hub #theory-root-title {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  width: 100%;
  margin: 0;
  text-align: left !important;
}

.theory-root-shell.is-hub .theory-nav-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.95rem;
  padding: 0.18rem 0 1rem;
}

.theory-root-shell.is-hub .theory-nav-panel {
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 0.6rem);
}

.theory-root-shell.is-screen .theory-overview,
.theory-root-shell.is-screen .theory-nav-panel {
  display: none;
}

.theory-root-shell.is-screen {
  width: 100%;
  max-width: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  gap: 0.75rem;
}

.theory-root-shell.is-screen .theory-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.theory-root-shell.is-screen .theory-content-panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.theory-root-shell.is-session .theory-content-panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  gap: 0.35rem;
  min-height: calc(100dvh - 12rem);
}

.theory-root-shell.is-session .theory-feature-hero {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.theory-root-shell.is-session .theory-feature-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 0.2rem;
  align-content: start;
}

.theory-root-shell.is-session .theory-feature-grid > article,
.theory-root-shell.is-session .theory-feature-grid > div,
.theory-root-shell.is-session .theory-session-card,
.theory-root-shell.is-session .theory-session-visual {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.theory-root-shell.is-session .theory-feature-grid > article {
  padding: 0;
}

.theory-root-shell.is-session .theory-apk-fragment {
  gap: 0.45rem;
}

.theory-root-shell.is-session .theory-apk-fragment-controls {
  gap: 0.45rem;
}

.theory-root-shell.is-session .theory-apk-actions-bottom {
  padding-top: 0.05rem;
}

.theory-root-shell.is-session .theory-apk-feedback {
  padding: 0.45rem 0.1rem 0;
  background: transparent;
}

.theory-root-shell.is-session .theory-apk-feedback.is-correct {
  min-height: 0;
  padding: 0;
}

.theory-root-shell.is-session {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.theory-root-shell.is-session .theory-root-header {
  align-items: center;
  gap: 0.7rem;
  padding: 0.78rem 0.9rem 0.62rem;
  background: #1f4f7a;
  color: #ffffff;
}

.theory-root-shell.is-session .theory-root-header-actions {
  display: inline-flex;
  gap: 0.12rem;
}

.theory-root-shell.is-session .theory-root-header-icon {
  color: rgba(255, 255, 255, 0.92);
  min-width: 26px;
  min-height: 26px;
  opacity: 0.92;
}

.theory-root-shell.is-session .theory-root-header-copy {
  gap: 0.08rem;
}

.theory-root-shell.is-session .theory-root-back {
  border: 0;
  background: transparent;
  color: #ffffff;
  padding: 0.25rem 0.15rem;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theory-root-shell.is-session .theory-root-back svg {
  width: 22px;
  height: 22px;
}

.theory-root-shell.is-session .theory-root-eyebrow,
.theory-root-shell.is-session .theory-root-eyebrow {
  display: none;
}

.theory-root-shell.is-session #theory-root-title {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
}

.theory-root-shell.is-session .theory-root-subcopy {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  line-height: 1.2;
}

.theory-root-shell.is-session .theory-workspace {
  gap: 0;
}

.theory-root-shell.is-session .theory-session-visual {
  display: none;
}

.theory-root-shell.is-session .theory-apk-fragment {
  min-height: calc(100dvh - 11.8rem);
  align-content: start;
  grid-template-rows: auto 1fr auto;
}

.theory-root-shell.is-session .theory-apk-response-stage {
  padding-top: 0.7rem;
}

.theory-root-shell.is-session .theory-apk-response-wheel {
  padding-top: 0.2rem;
  min-height: 395px;
  align-content: center;
}

.theory-root-shell.is-session .theory-apk-fragment-staff .theory-apk-response-wheel {
  min-height: 410px;
}

.theory-nav-panel,
.theory-content-panel,
.theory-card,
.theory-feature-hero,
.theory-feature-grid article {
  border: 1px solid rgba(58, 31, 26, 0.08);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 246, 244, 0.98));
  padding: 1rem;
}

.theory-nav-panel,
.theory-content-panel {
  box-shadow: 0 18px 32px rgba(38, 18, 14, 0.07);
}

.theory-nav-panel {
  display: grid;
  gap: 0.8rem;
  align-content: start;
}

.theory-nav-heading {
  display: grid;
  gap: 0.2rem;
}

.theory-nav-heading h3 {
  margin: 0;
  color: #231917;
  font-size: 1.15rem;
}

.theory-nav-list {
  display: grid;
  gap: 0.6rem;
}

.theory-nav-button {
  width: 100%;
  border: 0;
  border-radius: 5px;
  background: #fff;
  padding: 0;
  display: grid;
  text-align: left;
  color: #231917;
  box-shadow: 0 1px 3px rgba(38, 18, 14, 0.12);
  overflow: hidden;
  position: relative;
  min-height: 0;
}

.theory-nav-progress {
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 500;
  color: #8a7570;
}

.theory-nav-button-copy strong {
  font-size: 1.02rem;
  line-height: 1.18;
  font-weight: 400;
}

.theory-nav-button-copy small {
  color: #8a7570;
  line-height: 1.35;
  font-size: 0.82rem;
}

.theory-nav-button.is-active {
  transform: none;
  box-shadow: 0 2px 8px rgba(38, 18, 14, 0.12);
}

.theory-nav-button-art {
  width: 100%;
  aspect-ratio: 2.32 / 1;
  object-fit: cover;
  display: block;
}

.theory-nav-button-copy {
  display: grid;
  gap: 0.28rem;
  padding: 1rem 1rem 1.02rem;
  background: #fff;
}

.theory-root-shell.is-hub .theory-nav-button-copy strong {
  font-size: 1.18rem;
  font-weight: 400;
}

.theory-root-shell.is-hub .theory-nav-button-copy small {
  font-size: 0.84rem;
  line-height: 1.32;
}

.theory-content-panel {
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.theory-feature-hero {
  background:
    radial-gradient(circle at top right, rgba(255, 120, 102, 0.24), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 246, 244, 0.98));
  display: grid;
  gap: 0.8rem;
}

.theory-arcade-hero {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  margin: -1.2rem -1.2rem 0;
}

.theory-arcade-hero-art {
  width: 100%;
  aspect-ratio: 2.1 / 1;
  object-fit: cover;
  display: block;
}

.theory-arcade-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.85rem;
  background: linear-gradient(180deg, rgba(9, 14, 22, 0.02), rgba(9, 14, 22, 0.44));
  color: #fff;
}

.theory-arcade-hero-title,
.theory-arcade-hero-score {
  font-size: 0.88rem;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.theory-root-shell.is-screen .theory-feature-hero {
  border-radius: 10px;
  overflow: hidden;
}

.theory-feature-hero-top {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: flex-start;
}

.theory-feature-hero-side {
  display: grid;
  gap: 0.75rem;
  justify-items: end;
}

.theory-feature-hero-art {
  width: min(180px, 26vw);
  max-width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(58, 31, 26, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(38, 18, 14, 0.08);
}

.theory-feature-hero-art-wide {
  width: 100%;
  height: clamp(180px, 28vw, 260px);
  object-fit: cover;
  border-radius: 22px;
}

.theory-feature-hero-copy {
  display: grid;
  gap: 0.3rem;
}

.theory-feature-hero-copy h3,
.theory-feature-grid article h4 {
  margin: 0;
  color: #231917;
}

.theory-feature-hero-copy p,
.theory-feature-grid article p {
  margin: 0;
  color: #6f5954;
  line-height: 1.45;
}

.theory-feature-chip {
  border-radius: 999px;
  border: 1px solid rgba(255, 82, 61, 0.22);
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: #ff523d;
  background: rgba(255, 255, 255, 0.84);
  white-space: nowrap;
}

.theory-feature-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.7rem;
}

.theory-feature-meta-item {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(58, 31, 26, 0.08);
  padding: 0.85rem;
  display: grid;
  gap: 0.2rem;
}

.theory-feature-meta-item span {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a35c50;
}

.theory-feature-meta-item strong {
  color: #231917;
  font-size: 1rem;
}

.theory-feature-coach {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(58, 31, 26, 0.08);
}

.theory-feature-coach strong {
  color: #231917;
}

.theory-feature-coach p {
  margin: 0;
  color: #6f5954;
  line-height: 1.45;
}

.theory-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.theory-feature-grid article {
  display: grid;
  gap: 0.5rem;
  min-height: 188px;
}

.theory-drill-card-art {
  width: 100%;
  max-height: 172px;
  object-fit: cover;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.theory-drill-card,
.theory-drill-detail-card {
  align-content: start;
}

.theory-drill-card {
  display: grid;
  gap: 0.8rem;
}

.theory-drill-card.is-linear,
.theory-drill-card.is-arcade {
  grid-template-columns: minmax(120px, 170px) minmax(0, 1fr) auto;
  align-items: center;
}

.theory-drill-card.is-linear .theory-drill-card-top,
.theory-drill-card.is-arcade .theory-drill-card-top {
  display: grid;
  gap: 0.25rem;
}

.theory-drill-card.is-linear p,
.theory-drill-card.is-arcade p {
  margin: 0;
  color: #6f5954;
}

.theory-drill-inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.theory-drill-inline-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 82, 61, 0.08);
  color: #a35c50;
  font-size: 0.76rem;
  font-weight: 800;
}

.theory-drill-row-action {
  align-self: center;
  justify-self: end;
  border: 0;
  border-radius: 999px;
  background: #231917;
  color: #fffaf8;
  min-height: 46px;
  padding: 0.85rem 1rem;
  font-weight: 800;
}

.theory-drill-queue-card ul {
  margin: 0;
  padding-left: 1.1rem;
}

.theory-session-card {
  align-content: start;
}

.theory-session-pattern-card {
  background:
    radial-gradient(circle at top right, rgba(255, 120, 102, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 246, 244, 0.98));
}

.theory-session-count {
  min-height: 88px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 900;
  color: #231917;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(58, 31, 26, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.theory-session-visual {
  border-radius: 22px;
  background: #fff;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.theory-session-meter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  gap: 0.7rem;
}

.theory-session-reading,
.theory-session-dictation,
.theory-session-imitation,
.theory-session-elements,
.theory-session-arcade {
  display: grid;
  gap: 0.8rem;
}

.theory-reading-pattern {
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: rgba(255, 82, 61, 0.08);
  border: 1px solid rgba(255, 82, 61, 0.14);
  color: #231917;
  font-weight: 800;
  text-align: center;
}

.theory-reading-pulses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.theory-reading-pulse {
  min-width: 44px;
  min-height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(58, 31, 26, 0.08);
  color: #6f5954;
  font-weight: 800;
}

.theory-reading-pulse.is-accent {
  background: linear-gradient(180deg, #ff6854, #ff523d);
  color: #fffaf8;
}

.theory-dictation-lane,
.theory-imitation-lane {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(58, 31, 26, 0.08);
}

.theory-dictation-lane strong,
.theory-imitation-lane strong {
  color: #231917;
}

.theory-dictation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 0.95rem;
  border-radius: 16px;
  background: rgba(255, 82, 61, 0.08);
  border: 1px solid rgba(255, 82, 61, 0.14);
}

.theory-dictation-header strong {
  color: #231917;
}

.theory-dictation-header span {
  color: #8a7570;
  font-size: 0.82rem;
  font-weight: 700;
}

.theory-dictation-lane.is-response,
.theory-imitation-lane.is-response {
  background: rgba(255, 82, 61, 0.08);
  border-color: rgba(255, 82, 61, 0.14);
}

.theory-dictation-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.theory-dictation-bar {
  height: 18px;
  border-radius: 999px;
  background: rgba(58, 31, 26, 0.12);
}

.theory-dictation-bar.is-filled {
  background: linear-gradient(180deg, #ff6854, #ff523d);
}

.theory-dictation-lane small {
  color: rgba(35, 25, 23, 0.62);
  font-size: 0.76rem;
  font-weight: 700;
}

.theory-imitation-arrow {
  justify-self: center;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  background: rgba(58, 31, 26, 0.08);
  color: #6f5954;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.theory-imitation-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}

.theory-imitation-node {
  height: 12px;
  border-radius: 999px;
  background: rgba(58, 31, 26, 0.12);
}

.theory-imitation-node.is-active {
  background: linear-gradient(180deg, #ff6854, #ff523d);
}

.theory-session-elements {
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

.theory-element-chip {
  min-height: 88px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(58, 31, 26, 0.08);
  color: #6f5954;
  font-weight: 800;
  border: 1px solid rgba(58, 31, 26, 0.08);
}

.theory-element-chip.is-focus {
  background: linear-gradient(180deg, #ff6854, #ff523d);
  color: #fffaf8;
  box-shadow: 0 12px 24px rgba(255, 82, 61, 0.18);
}

.theory-meter-beat {
  min-height: 72px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 82, 61, 0.08);
  color: #6f5954;
  font-weight: 800;
}

.theory-meter-signature {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 0.95rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(58, 31, 26, 0.08);
}

.theory-meter-signature strong {
  font-size: 1.35rem;
  color: #231917;
}

.theory-meter-signature span {
  color: #8a7570;
  font-size: 0.82rem;
  font-weight: 700;
}

.theory-meter-barline {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 82, 61, 0.18), rgba(58, 31, 26, 0.08));
}

.theory-meter-beat.is-accent {
  background: linear-gradient(180deg, #ff6854, #ff523d);
  color: #fffaf8;
  box-shadow: 0 12px 24px rgba(255, 82, 61, 0.18);
}

.theory-meter-beat small {
  font-size: 0.72rem;
  font-weight: 700;
  color: inherit;
  opacity: 0.85;
}

.theory-session-polyrhythm,
.theory-session-two-voice,
.theory-session-calibration {
  display: grid;
  gap: 0.8rem;
}

.theory-poly-lane,
.theory-voice-lane {
  display: grid;
  gap: 0.45rem;
}

.theory-poly-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 0.95rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(58, 31, 26, 0.08);
}

.theory-poly-header strong {
  font-size: 1.2rem;
  color: #231917;
}

.theory-poly-header span {
  color: #8a7570;
  font-size: 0.82rem;
  font-weight: 700;
}

.theory-poly-lane strong,
.theory-voice-lane strong {
  color: #231917;
}

.theory-poly-lane span,
.theory-voice-lane span {
  font-size: 0.82rem;
  color: #6f5954;
}

.theory-poly-pulses {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(18px, 1fr);
  gap: 0.5rem;
}

.theory-poly-pulse {
  height: 18px;
  border-radius: 999px;
  background: rgba(58, 31, 26, 0.18);
}

.theory-poly-pulse.is-accent {
  background: linear-gradient(180deg, #ff6854, #ff523d);
}

.theory-poly-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(14px, 1fr);
  gap: 0.35rem;
  align-items: center;
}

.theory-poly-grid-line {
  height: 4px;
  border-radius: 999px;
  background: rgba(58, 31, 26, 0.14);
}

.theory-poly-grid-line.is-accent {
  background: rgba(255, 82, 61, 0.42);
}

.theory-voice-lane {
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: rgba(255, 82, 61, 0.06);
  border: 1px solid rgba(255, 82, 61, 0.12);
}

.theory-voice-cells {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.theory-voice-cells em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 34px;
  padding: 0.25rem 0.55rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #6f5954;
  font-style: normal;
  font-weight: 700;
}

.theory-calibration-step {
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: rgba(58, 31, 26, 0.06);
  color: #6f5954;
  font-weight: 700;
}

.theory-calibration-step.is-active {
  background: rgba(255, 82, 61, 0.12);
  color: #231917;
  border: 1px solid rgba(255, 82, 61, 0.16);
}

.theory-arcade-score {
  display: grid;
  gap: 0.2rem;
  justify-items: center;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  background: rgba(255, 82, 61, 0.08);
  border: 1px solid rgba(255, 82, 61, 0.14);
}

.theory-arcade-score span {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a35c50;
}

.theory-arcade-score strong {
  color: #231917;
  font-size: 1.4rem;
}

.theory-arcade-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
}

.theory-arcade-node {
  height: 18px;
  border-radius: 999px;
  background: rgba(58, 31, 26, 0.12);
}

.theory-arcade-node.is-active {
  background: linear-gradient(180deg, #ff6854, #ff523d);
  box-shadow: 0 8px 18px rgba(255, 82, 61, 0.18);
}

.theory-drill-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
}

.theory-drill-pill {
  border-radius: 999px;
  padding: 0.4rem 0.65rem;
  background: rgba(255, 82, 61, 0.08);
  color: #ff523d;
  border: 1px solid rgba(255, 82, 61, 0.16);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.theory-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.theory-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  width: 100%;
}

.theory-choice-card {
  border-radius: 18px;
  border: 1px solid rgba(58, 31, 26, 0.1);
  background: rgba(255, 255, 255, 0.96);
  padding: 0.9rem 1rem;
  display: grid;
  gap: 0.3rem;
  text-align: left;
  min-height: 84px;
}

.theory-choice-card strong {
  color: #231917;
}

.theory-choice-card span {
  color: rgba(35, 25, 23, 0.68);
  font-size: 0.82rem;
  line-height: 1.35;
}

.theory-choice-card-meter {
  justify-items: start;
}

.theory-choice-card-meter strong {
  font-size: 1.28rem;
}

.theory-choice-card-ratio .theory-ratio-visual {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.theory-choice-card-ratio .theory-ratio-visual strong {
  font-size: 1.2rem;
}

.theory-choice-card-ratio .theory-ratio-visual span {
  font-size: 1.1rem;
  color: #ff523d;
  font-weight: 800;
}

.theory-choice-card-voice,
.theory-choice-card-element {
  background:
    radial-gradient(circle at top right, rgba(255, 120, 102, 0.08), transparent 38%),
    rgba(255, 255, 255, 0.96);
}

.theory-pattern-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.theory-pattern-badge {
  display: inline-grid;
  gap: 0.1rem;
  align-items: center;
  justify-items: center;
  min-width: 3.4rem;
  padding: 0.45rem 0.5rem;
  border-radius: 14px;
  background: rgba(255, 82, 61, 0.1);
  border: 1px solid rgba(255, 82, 61, 0.14);
}

.theory-pattern-badge strong {
  font-size: 0.84rem;
  line-height: 1;
}

.theory-pattern-badge small {
  font-size: 0.64rem;
  color: #6f5954;
}

.theory-primary-btn,
.theory-secondary-btn,
.theory-choice-btn {
  border-radius: 16px;
  padding: 0.8rem 1rem;
  font-weight: 800;
  border: 1px solid rgba(58, 31, 26, 0.08);
}

.theory-primary-btn {
  background: linear-gradient(180deg, #ff6854, #ff523d);
  color: #fffaf8;
  box-shadow: 0 14px 24px rgba(255, 82, 61, 0.18);
}

.theory-secondary-btn {
  background: #fff;
  color: #231917;
}

.theory-imitation-pad {
  width: 100%;
  min-height: 4.75rem;
  font-size: 1rem;
  letter-spacing: 0;
}

.theory-choice-btn {
  background: rgba(255, 255, 255, 0.96);
  color: #231917;
  min-height: 56px;
  text-align: center;
}

.theory-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.theory-icon-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 auto;
}

.theory-feature-chip-score {
  min-width: 84px;
  justify-content: center;
}

.theory-completion-zone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
}

.theory-session-statusbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.18rem 0.88rem 0;
}

.theory-session-statuscopy {
  display: inline-flex;
  align-items: center;
  gap: 0.08rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  color: #1f1a18;
  font-size: 0.74rem;
  font-weight: 500;
}

.theory-session-status-sep {
  color: rgba(31, 26, 24, 0.46);
  padding-inline: 0.08rem;
}

.theory-session-status-errors {
  color: #a63c35;
  font-weight: 700;
}

.theory-completion-bar-session {
  min-height: 5px;
}

.theory-apk-session-prompt {
  margin: 0;
  padding: 1.5rem 1.4rem 0.1rem;
  max-width: 88%;
  justify-self: center;
  text-align: center;
  color: rgba(110, 110, 110, 0.62);
  font-size: clamp(1.45rem, 5vw, 2.35rem);
  line-height: 1.16;
  font-weight: 400;
}

.theory-completion-bar {
  position: relative;
  min-height: 5px;
  border-radius: 999px;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(58, 31, 26, 0.12) 0 6px,
      rgba(58, 31, 26, 0.04) 6px 12px
    );
}

.theory-completion-fill {
  position: absolute;
  inset: 1px auto 1px 0;
  border-radius: 999px;
  background: #ff523d;
}

.theory-completion-count {
  color: #7b635d;
  font-size: 0.76rem;
  font-weight: 700;
}

.theory-session-titlebar {
  display: grid;
  gap: 0.14rem;
  justify-items: center;
  text-align: center;
}

.theory-session-titlebar strong {
  color: #231917;
  font-size: 0.98rem;
}

.theory-session-titlebar small {
  color: #8a7570;
  font-size: 0.8rem;
  font-weight: 700;
}

.theory-result-card {
  background:
    radial-gradient(circle at top right, rgba(255, 120, 102, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 246, 244, 0.98));
}

.theory-result-overview {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: flex-start;
}

.theory-result-overview h4 {
  margin: 0.2rem 0 0;
}

.theory-result-score-pill {
  min-width: 68px;
  min-height: 68px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: linear-gradient(180deg, #ff6854, #ff523d);
  color: #fffaf8;
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow: 0 16px 26px rgba(255, 82, 61, 0.2);
}

.theory-result-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.theory-result-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  background: rgba(255, 82, 61, 0.12);
  color: #b13d2e;
  font-size: 0.8rem;
  font-weight: 800;
}

.theory-result-badge-muted {
  background: rgba(58, 31, 26, 0.08);
  color: #6f5954;
}

.theory-result-badge-alert {
  background: rgba(196, 52, 35, 0.12);
  color: #a73224;
}

.theory-result-metric-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.36rem;
}

.theory-step-review {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.theory-step-review li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: 16px;
  border: 1px solid rgba(58, 31, 26, 0.08);
  background: rgba(255, 255, 255, 0.88);
}

.theory-step-review li.is-correct {
  border-color: rgba(53, 97, 76, 0.18);
  background: rgba(53, 97, 76, 0.08);
}

.theory-step-review li.is-wrong {
  border-color: rgba(166, 60, 53, 0.18);
  background: rgba(166, 60, 53, 0.08);
}

.theory-step-review strong {
  color: #231917;
}

.theory-step-review span {
  color: #6f5954;
}

.theory-step-review small {
  color: #a35c50;
  font-size: 0.78rem;
  line-height: 1.35;
}

.theory-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.theory-history-row > div:first-child {
  display: grid;
  gap: 0.2rem;
}

.theory-history-row > div:first-child span {
  color: #8a7570;
  font-size: 0.8rem;
}

.theory-history-row-meta {
  display: grid;
  justify-items: end;
  gap: 0.15rem;
}

.theory-history-link {
  border: 0;
  background: transparent;
  color: #ff523d;
  font-weight: 800;
  padding: 0;
  justify-self: start;
}

.theory-achievement-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.theory-achievement-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(58, 31, 26, 0.08);
  background: rgba(255, 255, 255, 0.88);
}

.theory-achievement-item.is-unlocked {
  border-color: rgba(255, 82, 61, 0.22);
  background: rgba(255, 82, 61, 0.08);
}

.theory-achievement-item > div {
  display: grid;
  gap: 0.2rem;
}

.theory-achievement-item strong {
  color: #231917;
}

.theory-achievement-item span {
  color: #6f5954;
  font-size: 0.84rem;
  line-height: 1.45;
}

.theory-achievement-item em {
  color: #b13d2e;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.theory-staff-card {
  background:
    radial-gradient(circle at top right, rgba(255, 120, 102, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 246, 244, 0.98));
}

.theory-session-staff {
  gap: 0.9rem;
}

.theory-staff-visual-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.theory-staff-visual-header strong {
  font-size: 1rem;
  color: #332522;
}

.theory-staff-visual-header span {
  color: #8a6b64;
  font-size: 0.9rem;
  font-weight: 700;
}

.theory-staff-measure {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
  gap: 0.55rem;
}

.theory-staff-measure-slot {
  min-height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #7a6058;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(58, 31, 26, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.theory-staff-measure-slot.is-accent {
  color: #ff624c;
  border-color: rgba(255, 98, 76, 0.28);
  box-shadow: 0 10px 20px rgba(255, 98, 76, 0.12);
}

.theory-staff-guides {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.theory-staff-guides span,
.theory-staff-toolbar-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(58, 31, 26, 0.06);
  color: #7d6460;
  font-size: 0.8rem;
  font-weight: 800;
}

.theory-staff-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.theory-staff-display {
  min-height: 86px;
  border-radius: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 0.7rem;
  align-items: stretch;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(58, 31, 26, 0.08);
}

.theory-staff-slot {
  min-height: 96px;
  border-radius: 18px;
  padding: 0.65rem 0.55rem;
  background: rgba(58, 31, 26, 0.04);
  border: 1px dashed rgba(58, 31, 26, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.theory-staff-slot.is-filled {
  background: rgba(255, 115, 89, 0.08);
  border-style: solid;
  border-color: rgba(255, 98, 76, 0.2);
}

.theory-staff-slot-index {
  font-size: 0.72rem;
  font-weight: 800;
  color: #aa7d73;
  letter-spacing: 0.04em;
}

.theory-staff-token {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 56px;
  border-radius: 14px;
  padding: 0.45rem 0.7rem;
  background: rgba(58, 31, 26, 0.08);
  color: #6f5954;
  font-weight: 800;
  text-transform: uppercase;
  gap: 0.1rem;
}

.theory-staff-token strong {
  font-size: 0.94rem;
  line-height: 1;
}

.theory-staff-token small {
  font-size: 0.66rem;
  line-height: 1.1;
  text-transform: none;
}

.theory-staff-token.is-filled {
  background: linear-gradient(180deg, #ff6854, #ff523d);
  color: #fffaf8;
}

.theory-staff-token.is-palette {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 98, 76, 0.12);
  color: #523f3c;
}

.theory-staff-target {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.theory-staff-target strong {
  color: #594542;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

.theory-staff-target-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.theory-staff-placeholder {
  color: #8a7570;
  font-weight: 700;
}

.theory-inline-status {
  margin: 0;
  color: #35614c;
  font-size: 0.88rem;
  font-weight: 700;
}

.theory-inline-status-error {
  color: #a63c35;
}

.theory-apk-card {
  display: grid;
  gap: 1rem;
}

.theory-apk-session-shell {
  gap: 0.65rem;
}

.theory-apk-session-header {
  display: grid;
  gap: 0.18rem;
  justify-items: center;
  text-align: center;
}

.theory-apk-drill-hero {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 0.9rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(249,242,239,0.96));
  border: 1px solid rgba(58, 31, 26, 0.08);
}

.theory-apk-drill-art {
  width: 92px;
  height: 92px;
  object-fit: contain;
}

.theory-apk-drill-copy {
  display: grid;
  gap: 0.3rem;
}

.theory-apk-drill-copy strong {
  color: #241816;
  font-size: 1rem;
}

.theory-apk-drill-copy span {
  color: #785c56;
  font-size: 0.88rem;
  line-height: 1.5;
}

.theory-apk-response-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.9fr);
  align-items: center;
}

.theory-apk-fragment {
  display: grid;
  gap: 0.75rem;
}

.theory-apk-fragment-stage {
  display: grid;
  gap: 0.45rem;
}

.theory-apk-session-header,
.theory-staff-visual-header,
.theory-dictation-header,
.theory-apk-hit-counter {
  display: none;
}

.theory-apk-fragment-text {
  color: #5b4641;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
}

.theory-apk-fragment-controls {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
}

.theory-apk-fragment-status {
  display: none;
}

.theory-apk-feedback {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  text-align: center;
}

.theory-apk-feedback.is-correct {
  background: rgba(197, 239, 214, 0.62);
  color: #1f5e36;
}

.theory-apk-feedback.is-wrong {
  background: rgba(255, 223, 223, 0.72);
  color: #7a2d2d;
}

.theory-apk-feedback strong {
  font-size: 0.96rem;
}

.theory-apk-feedback .theory-apk-staff-shell {
  text-align: left;
}

.theory-apk-response-stage {
  display: grid;
  gap: 0.35rem;
}

.theory-apk-response-wheel {
  display: grid;
  place-items: center;
}

.theory-apk-staff-shell {
  display: grid;
  gap: 0.45rem;
}

.theory-apk-staff-surface {
  position: relative;
  min-height: 224px;
  padding: 0.9rem 0.9rem 0.7rem;
  border-radius: 22px;
  background: #ffffff;
  border: 0;
  box-shadow: none;
}

.theory-apk-staff-lines {
  position: absolute;
  inset: 17% 5% 12%;
  width: 88%;
  height: 68%;
  color: rgba(52, 33, 29, 0.92);
}

.theory-apk-staff-notes {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(var(--theory-apk-slot-count, 4), minmax(0, 1fr));
  gap: 0.6rem;
  align-items: end;
  min-height: 176px;
  padding: 1.4rem 1.1rem 1rem 3.6rem;
}

.theory-apk-staff-slot {
  min-height: 112px;
  display: grid;
  place-items: end center;
}

.theory-apk-staff-slot.is-empty-emphasis {
  opacity: 0.9;
}

.theory-apk-empty-slot {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2px dashed rgba(98, 70, 63, 0.2);
}

.theory-apk-staff-caption {
  color: #7d6460;
  font-size: 0.8rem;
  font-weight: 700;
}

.theory-apk-glyph {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  color: #151111;
}

.theory-apk-glyph-quarter,
.theory-apk-glyph-rest {
  width: 40px;
  height: 88px;
}

.theory-apk-note-head {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: auto;
}

.theory-apk-note-stem {
  position: absolute;
  bottom: 18px;
  left: 21px;
  width: 3px;
  height: 58px;
  border-radius: 999px;
  background: currentColor;
}

.theory-apk-rest {
  width: 32px;
  height: auto;
  align-self: center;
}

.theory-apk-glyph-eighths {
  width: 86px;
  height: 96px;
}

.theory-apk-note-pair {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 3px;
}

.theory-apk-paired-note {
  position: relative;
  width: 38px;
  height: 92px;
}

.theory-apk-paired-note .theory-apk-note-head {
  width: 27px;
}

.theory-apk-paired-note .theory-apk-note-stem {
  left: 19px;
  height: 57px;
}

.theory-apk-note-flag {
  position: absolute;
  top: 0;
  left: 16px;
  width: 20px;
  height: auto;
}

.theory-apk-wheel {
  position: relative;
  width: min(308px, 85.5vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,1) 0 28%, transparent 28.2%),
    radial-gradient(circle at 50% 50%, transparent 0 31%, rgba(233, 233, 233, 0.92) 31% 32.2%, transparent 32.2% 58.5%, rgba(236, 236, 236, 0.9) 58.5% 59.8%, transparent 59.8%);
  border: 0;
  box-shadow: none;
}

.theory-apk-wheel.is-idle {
  opacity: 0.52;
}

.theory-apk-wheel-ghost {
  position: absolute;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: rgba(18, 13, 12, 0.86);
  opacity: 0.42;
}

.theory-apk-wheel-ghost.is-main {
  width: 58px;
  height: 58px;
}

.theory-apk-wheel-ghost.is-secondary {
  width: 48px;
  height: 48px;
  opacity: 0.28;
}

.theory-apk-wheel-ghost .theory-apk-glyph-quarter { width: 24px; height: 54px; }
.theory-apk-wheel-ghost .theory-apk-glyph-rest { width: 22px; height: 48px; }
.theory-apk-wheel-ghost .theory-apk-glyph-eighths { width: 44px; height: 58px; }

.theory-apk-wheel-ghost .theory-apk-note-head,
.theory-apk-wheel-ghost .theory-apk-rest,
.theory-apk-wheel-ghost .theory-apk-note-flag {
  filter: grayscale(1) brightness(0.68);
}

.theory-apk-wheel-ghost .theory-apk-note-stem {
  background: rgba(18, 13, 12, 0.72);
}

.theory-apk-wheel-core {
  position: absolute;
  inset: 36%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background: transparent;
  color: #6f5a55;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: none;
}

.theory-apk-wheel-core-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1f1715;
}

.theory-apk-wheel-core-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theory-apk-wheel-button {
  position: absolute;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.theory-apk-wheel-button:active {
  background: rgba(248, 92, 72, 0.12);
}

.theory-apk-wheel-button.is-live {
  background: rgba(248, 92, 72, 0.94);
  box-shadow: 0 10px 22px rgba(80, 26, 19, 0.16);
}

.theory-apk-wheel-button.is-live .theory-apk-note-head,
.theory-apk-wheel-button.is-live .theory-apk-rest,
.theory-apk-wheel-button.is-live .theory-apk-note-flag {
  filter: brightness(0) invert(1);
}

.theory-apk-wheel-button.is-live .theory-apk-note-stem {
  background: #ffffff;
}

.theory-apk-wheel-button.is-secondary {
  width: 48px;
  height: 48px;
  background: transparent;
}

.theory-apk-wheel-button .theory-apk-glyph-quarter { width: 28px; height: 58px; }
.theory-apk-wheel-button .theory-apk-glyph-rest { width: 26px; height: 56px; }
.theory-apk-wheel-button .theory-apk-glyph-eighths { width: 52px; height: 66px; }
.theory-apk-wheel-button .theory-apk-note-head,
.theory-apk-wheel-button .theory-apk-rest,
.theory-apk-wheel-button .theory-apk-note-flag {
  filter: none;
}
.theory-apk-wheel-button .theory-apk-note-stem {
  background: #181111;
}

.theory-apk-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.65rem;
}

.theory-apk-actions-center {
  justify-content: center;
}

.theory-apk-actions-bottom {
  justify-content: center;
  align-items: center;
}

.theory-root-shell.is-session .theory-apk-actions-bottom {
  margin-top: auto;
  padding-bottom: 1.35rem;
}

.theory-apk-action-btn {
  min-height: 44px;
  padding: 0.35rem 0.55rem;
  border: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: transparent;
  color: #4a3530;
  box-shadow: none;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.92rem;
}

.theory-apk-action-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.theory-apk-action-btn-text {
  min-height: 48px;
}

.theory-apk-action-btn-icon {
  width: 68px;
  min-width: 68px;
  min-height: 68px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  opacity: 0.48;
}

.theory-apk-action-btn:active img {
  transform: scale(0.96);
}

.theory-apk-action-btn-icon img {
  width: 44px;
  height: 44px;
  opacity: 0.56;
  filter: grayscale(1) brightness(1.14);
}

.theory-apk-action-btn.is-live img {
  opacity: 0.96;
  filter: none;
}

.theory-apk-action-btn.is-idle {
  opacity: 0.36;
}

.theory-apk-token-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.theory-apk-token-legend-compact {
  justify-content: center;
}

.theory-apk-token-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 34px;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(58, 31, 26, 0.06);
  color: #705955;
  font-size: 0.76rem;
  font-weight: 800;
}

.theory-apk-token-chip strong {
  color: #2b1d1a;
}

.theory-apk-token-chip small {
  font-size: 0.72rem;
}

.theory-apk-target-strip {
  display: none;
}

.theory-apk-target-pattern {
  display: flex;
  align-items: end;
  gap: 0.6rem;
  min-height: 86px;
  padding: 0.75rem 0.9rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(58, 31, 26, 0.08);
}

.theory-apk-target-token {
  display: inline-flex;
  align-items: end;
  min-width: 40px;
}

.theory-apk-minor-actions {
  justify-content: flex-end;
}

.theory-apk-tap-input {
  width: min(240px, 68vw);
  aspect-ratio: 1;
  border: none;
  border-radius: 50%;
  justify-self: center;
  background: radial-gradient(circle at 50% 40%, #ff7a68 0, #f85c48 58%, #d84a39 100%);
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: 0 16px 30px rgba(124, 40, 29, 0.24);
}

.theory-apk-tap-input:active {
  transform: scale(0.98);
}

.theory-apk-tap-surface {
  position: relative;
  width: min(520px, 100%);
  min-height: 220px;
  padding: 1.2rem;
  border: 1px solid rgba(58, 31, 26, 0.12);
  border-radius: 28px;
  justify-self: stretch;
  display: grid;
  place-items: center;
  gap: 0.75rem;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.98) 0, rgba(255, 240, 234, 0.95) 24%, rgba(255, 195, 180, 0.82) 24.5%, rgba(255, 173, 153, 0.7) 36%, rgba(255, 255, 255, 0.95) 36.5%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 18px 36px rgba(124, 40, 29, 0.12);
  overflow: hidden;
}

.theory-apk-tap-surface:active {
  transform: scale(0.995);
}

.theory-apk-tap-surface:disabled {
  opacity: 0.6;
}

.theory-apk-tap-surface-ripple {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  border: 1px solid rgba(248, 92, 72, 0.18);
  pointer-events: none;
}

.theory-apk-tap-surface-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  color: #5e261e;
}

.theory-apk-tap-surface-copy strong {
  font-size: 1.2rem;
  font-weight: 700;
}

.theory-apk-tap-surface-copy small {
  font-size: 0.84rem;
  opacity: 0.72;
}

.theory-apk-tap-surface-count {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  min-height: 3rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(248, 92, 72, 0.14);
  color: #8a3024;
  font-size: 1.1rem;
  font-weight: 700;
}

.theory-apk-tap-surface-track {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  width: min(100%, 320px);
}

.theory-apk-tap-surface-marker {
  width: 0.78rem;
  height: 0.78rem;
  border-radius: 50%;
  background: rgba(110, 55, 46, 0.14);
  border: 1px solid rgba(110, 55, 46, 0.1);
}

.theory-apk-tap-surface-marker.is-target {
  background: rgba(248, 92, 72, 0.12);
  border-color: rgba(248, 92, 72, 0.18);
}

.theory-apk-tap-surface-marker.is-hit {
  background: #f85c48;
  border-color: #f85c48;
}

.theory-apk-tap-surface.is-idle .theory-apk-tap-surface-ripple,
.theory-apk-tap-surface.is-idle .theory-apk-tap-surface-count {
  opacity: 0.58;
}

.theory-apk-hit-counter {
  justify-content: center;
}

@media (max-width: 860px) {
  .theory-apk-response-layout {
    grid-template-columns: 1fr;
  }

  .theory-apk-fragment-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .theory-apk-drill-hero {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .theory-apk-staff-surface {
    min-height: 176px;
    padding: 0.8rem;
  }

  .theory-apk-staff-notes {
    min-height: 146px;
    padding: 1rem 0.7rem 0.8rem 2.8rem;
    gap: 0.35rem;
  }

  .theory-apk-wheel {
    width: min(240px, 74vw);
  }

  .theory-apk-wheel-button {
    width: 52px;
    height: 52px;
  }

  .theory-apk-action-btn-icon {
    width: 46px;
    min-width: 46px;
    min-height: 46px;
  }
}

.theory-leaderboard-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.5rem;
}

.theory-leaderboard-list-rich {
  padding-left: 0;
  list-style: none;
}

.theory-leaderboard-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.55rem;
  align-items: center;
}

.theory-leaderboard-list-rich li {
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 0.75rem 0.85rem;
  border-radius: 18px;
  border: 1px solid rgba(58, 31, 26, 0.08);
  background: rgba(255, 255, 255, 0.84);
}

.theory-leaderboard-list-rich li.is-podium {
  background:
    radial-gradient(circle at top right, rgba(255, 120, 102, 0.12), transparent 40%),
    rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 82, 61, 0.14);
}

.theory-leaderboard-rank {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(58, 31, 26, 0.08);
  color: #231917;
  font-weight: 800;
}

.theory-leaderboard-entry {
  display: grid;
  gap: 0.18rem;
}

.theory-star-strip {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
}

.theory-star-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.theory-star-icon.is-inactive {
  opacity: 0.45;
}

.theory-leaderboard-list strong {
  color: #231917;
}

.theory-leaderboard-list span,
.theory-leaderboard-list em {
  color: #6f5954;
  font-style: normal;
}

.theory-history-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.theory-history-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(58, 31, 26, 0.08);
}

.theory-history-list strong {
  color: #231917;
}

.theory-history-list span,
.theory-history-list em {
  color: #6f5954;
  font-style: normal;
}

.theory-program-list {
  display: grid;
  gap: 0.8rem;
}

.theory-program-deck {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
}

.theory-program-deck-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 1rem;
  border: 1px solid rgba(58, 31, 26, 0.08);
  background:
    radial-gradient(circle at top right, rgba(255, 120, 102, 0.1), transparent 38%),
    rgba(255, 255, 255, 0.9);
  display: grid;
  gap: 0.8rem;
}

.theory-program-deck-card-primary {
  background:
    radial-gradient(circle at top right, rgba(255, 120, 102, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 246, 244, 0.98));
}

.theory-program-deck-art {
  position: absolute;
  right: -10px;
  top: -10px;
  width: 110px;
  opacity: 0.24;
  pointer-events: none;
}

.theory-program-deck-copy {
  position: relative;
  display: grid;
  gap: 0.35rem;
}

.theory-program-deck-copy h4 {
  margin: 0;
  color: #231917;
}

.theory-program-deck-copy p {
  margin: 0;
  color: rgba(35, 25, 23, 0.72);
}

.theory-program-join-actions {
  align-items: stretch;
}

.theory-program-card {
  border-radius: 18px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(58, 31, 26, 0.08);
  display: grid;
  gap: 0.45rem;
}

.theory-program-board-art {
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(58, 31, 26, 0.08);
  background: rgba(255, 255, 255, 0.76);
}

.theory-program-board-art img,
.theory-leaderboard-hero-art {
  width: 100%;
  display: block;
  object-fit: cover;
}

.theory-leaderboard-hero-art {
  max-height: 180px;
  border-radius: 18px;
  border: 1px solid rgba(58, 31, 26, 0.08);
  background: rgba(255, 255, 255, 0.76);
}

.theory-ranking-screen {
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(18, 17, 16, 0.92), rgba(18, 17, 16, 0.92)),
    url("assets/theory-apk/illustrations/chooser_arcade.webp") center/cover no-repeat;
  color: #ffffff;
}

.theory-ranking-topband {
  min-height: 88px;
  padding: 1.1rem 1.4rem 0.8rem;
  display: flex;
  align-items: end;
  background: rgba(0, 0, 0, 0.22);
}

.theory-ranking-topband strong {
  font-size: 1.9rem;
  font-weight: 600;
}

.theory-ranking-surface {
  display: grid;
  gap: 1.6rem;
  padding: 1.6rem 1.35rem 1.8rem;
  background: rgba(84, 84, 84, 0.72);
}

.theory-ranking-hint {
  justify-self: center;
  max-width: 29rem;
  margin: 0;
  padding: 0.95rem 1rem;
  background: rgba(0, 0, 0, 0.28);
  text-align: center;
  color: rgba(255, 255, 255, 0.96);
  font-size: 1rem;
  line-height: 1.28;
}

.theory-ranking-scorehead {
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  text-align: center;
}

.theory-ranking-scorehead h3,
.theory-ranking-scorehead p {
  margin: 0;
}

.theory-ranking-scorehead h3 {
  font-size: 2.1rem;
  font-weight: 500;
}

.theory-ranking-scorehead p {
  font-size: 1.2rem;
}

.theory-ranking-table {
  display: grid;
  gap: 0;
}

.theory-ranking-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
  align-items: center;
  min-height: 4rem;
  color: rgba(255, 255, 255, 0.98);
}

.theory-ranking-row > span,
.theory-ranking-score-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  border-bottom: 2px solid rgba(255, 255, 255, 0.88);
}

.theory-ranking-row > span:first-child,
.theory-ranking-score-btn {
  font-size: 1.1rem;
}

.theory-ranking-row > span:first-child {
  border-right: 2px solid rgba(255, 255, 255, 0.88);
}

.theory-ranking-row.is-head {
  min-height: 4.5rem;
}

.theory-ranking-row.is-head > span {
  font-size: 1.45rem;
}

.theory-ranking-score-btn {
  width: 100%;
  border-left: none;
  border-right: none;
  border-top: none;
  background: transparent;
  color: inherit;
  font-size: 1.2rem;
  cursor: pointer;
}

.theory-ranking-score-btn.is-live {
  font-weight: 600;
}

.theory-ranking-score-btn.is-empty {
  opacity: 0.48;
  cursor: default;
}

.theory-ranking-score-btn.is-live:active {
  background: rgba(255, 255, 255, 0.12);
}

.theory-ranking-detail-screen {
  overflow: hidden;
  border-radius: 28px;
  background: #f8fbfa;
  color: #2c3135;
  display: grid;
}

.theory-ranking-detail-hero {
  min-height: 330px;
  padding: 2rem 1.25rem 1.5rem;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.9rem;
  background:
    radial-gradient(circle at 50% -20%, rgba(255, 255, 255, 0.9), rgba(239, 246, 243, 0.92) 60%, rgba(235, 243, 240, 0.96)),
    linear-gradient(180deg, #eef5f2, #eff5f2);
}

.theory-ranking-detail-trophy {
  width: 64px;
  height: 64px;
  background: linear-gradient(180deg, #7d7d7d, #6d6d6d);
  clip-path: polygon(24% 8%, 76% 8%, 76% 42%, 66% 58%, 61% 64%, 61% 76%, 76% 76%, 76% 88%, 24% 88%, 24% 76%, 39% 76%, 39% 64%, 34% 58%, 24% 42%);
  opacity: 0.9;
}

.theory-ranking-detail-hero h3 {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  color: #34383b;
}

.theory-ranking-detail-podium {
  margin-top: -36px;
  padding: 0 1rem 1.15rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 0.6rem;
  background:
    radial-gradient(130% 90% at 50% 0%, rgba(255, 255, 255, 0.98), rgba(252, 252, 252, 0.98) 40%, rgba(247, 249, 248, 1) 100%);
}

.theory-ranking-detail-podium-slot {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  text-align: center;
}

.theory-ranking-detail-podium-slot.is-champion {
  transform: translateY(-18px);
}

.theory-ranking-detail-podium-slot strong {
  font-size: 0.9rem;
  color: #5c6267;
  max-width: 11ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theory-ranking-detail-podium-slot span {
  color: #3982a0;
  font-size: 0.92rem;
  font-weight: 700;
}

.theory-ranking-detail-avatar {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: linear-gradient(180deg, #6ea3bb, #5d93ad);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
}

.theory-ranking-detail-podium-slot:not(.is-champion) .theory-ranking-detail-avatar {
  width: 74px;
  height: 74px;
  font-size: 1.6rem;
}

.theory-ranking-detail-podium-slot.is-empty .theory-ranking-detail-avatar {
  background: linear-gradient(180deg, #c4d2da, #b8c8d0);
}

.theory-ranking-detail-avatar i {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #ff7c56;
  color: #fff;
  font-style: normal;
  font-size: 0.95rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.theory-ranking-detail-toggle {
  padding: 1rem 1.1rem;
  background: #eef4f1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.theory-ranking-detail-toggle strong,
.theory-ranking-detail-toggle p {
  margin: 0;
}

.theory-ranking-detail-toggle strong {
  display: block;
  color: #293136;
  font-size: 0.95rem;
  font-weight: 600;
}

.theory-ranking-detail-toggle p {
  color: #7f888f;
  font-size: 0.8rem;
}

.theory-ranking-detail-switch {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #d3d7db;
  position: relative;
  flex: 0 0 auto;
}

.theory-ranking-detail-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #b7bcc1;
}

.theory-ranking-detail-list {
  display: grid;
}

.theory-ranking-detail-row {
  min-height: 74px;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(31, 49, 61, 0.08);
}

.theory-ranking-detail-rank {
  color: #2f3438;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

.theory-ranking-detail-user {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.theory-ranking-detail-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(180deg, #84c89f, #6eb68b);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.theory-ranking-detail-user strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #5a6167;
  font-size: 0.94rem;
  font-weight: 500;
}

.theory-ranking-detail-row em {
  color: #3982a0;
  font-style: normal;
  font-size: 0.98rem;
  font-weight: 700;
}

.theory-ranking-detail-loading,
.theory-ranking-detail-empty {
  margin: 0;
  padding: 1.4rem 1.1rem 1.6rem;
  text-align: center;
  color: #5c6267;
}

.theory-ranking-detail-loading.is-error {
  color: #8c3d2a;
}

.theory-program-progress {
  display: grid;
  gap: 0.45rem;
}

.theory-program-progress-lg {
  margin-top: 0.35rem;
}

.theory-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(58, 31, 26, 0.1);
  overflow: hidden;
}

.theory-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff6854, #ff523d);
  box-shadow: 0 6px 16px rgba(255, 82, 61, 0.2);
}

.theory-progress-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.45rem;
}

.theory-progress-meta strong {
  color: #231917;
  font-size: 0.82rem;
}

.theory-progress-meta span {
  color: rgba(35, 25, 23, 0.66);
  font-size: 0.8rem;
}

.theory-program-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.theory-program-card h4 {
  margin: 0;
  color: #231917;
}

.theory-program-chapter-summary {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
}

.theory-program-chapter-summary h4 {
  margin: 0;
}

.theory-program-chapter-summary p {
  margin: 0.2rem 0 0;
  color: rgba(35, 25, 23, 0.68);
  font-size: 0.84rem;
}

.theory-program-editor,
.theory-program-chapter-editor,
.theory-program-drill-editor {
  display: grid;
  gap: 0.8rem;
}

.theory-program-editor-head,
.theory-program-chapter-head,
.theory-program-drill-top {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
}

.theory-program-chapters,
.theory-program-drill-grid {
  display: grid;
  gap: 0.9rem;
}

.theory-form-field {
  display: grid;
  gap: 0.35rem;
}

.theory-form-field span {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(35, 25, 23, 0.8);
}

.theory-form-field input,
.theory-form-field textarea,
.theory-form-field select,
.theory-inline-input {
  width: 100%;
  border: 1px solid rgba(58, 31, 26, 0.12);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.92);
  color: #231917;
  font: inherit;
}

.theory-inline-input {
  min-width: 0;
  flex: 1 1 180px;
}

.theory-program-drill-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.theory-program-drill-list {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.theory-program-drill-row-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(58, 31, 26, 0.08);
}

.theory-program-drill-row-item strong,
.theory-program-drill-row-item span,
.theory-program-drill-actions {
  display: block;
}

.theory-program-drill-row-item span {
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: rgba(35, 25, 23, 0.68);
}

.theory-program-drill-actions {
  display: grid;
  gap: 0.45rem;
  justify-items: end;
}

.theory-program-drill-actions em {
  font-size: 0.78rem;
  color: rgba(35, 25, 23, 0.66);
  font-style: normal;
}

@media (max-width: 720px) {
  .theory-program-editor-head,
  .theory-program-chapter-head,
  .theory-program-drill-top {
    flex-direction: column;
  }

  .theory-program-drill-row {
    grid-template-columns: 1fr;
  }

  .theory-program-drill-row-item {
    flex-direction: column;
    align-items: stretch;
  }

  .theory-program-drill-actions {
    justify-items: stretch;
  }
}

.theory-card ul,
.theory-feature-grid article ul {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.3rem;
}
.glow {
  position: absolute;
  bottom: -50%;
  left: -0%;
  width: 200%;
  height: 100%;
  background: linear-gradient(0deg, #ff523d, transparent);
  filter: blur(10px);
  opacity: 0;
  z-index: -1;
}

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  /* Dice and Grid */
  --dice-size-base: 68px;
  --dice-size: var(--dice-size-base);
  --grid-rows: 4;
  --grid-columns: 4;

  /* Dice Face Colors */
  --face-1-color: #ff523d;
  --face-2-color: #ff7966;
  --face-3-color: #ff9f91;
  --face-4-color: #ffc6bd;
  --face-5-color: #ffe2dc;
  --face-6-color: #fff7f5;

  /* Dot Colors */
  --dot-color: black;
  --dot-hit-color: white;
  --block-inactive-color: #808080;
  --hold-note-active-15-color: #ff523d;
  --hold-note-active-2-color: #ff7966;
  --hold-note-active-3-color: #ff9f91;
  --hold-note-active-4-color: #ffc6bd;
}
/* Classes for dice faces */
.die-face-1 {
  background-color: var(--face-1-color) !important;
}

.die-face-2 {
  background-color: var(--face-2-color) !important;
}

.die-face-3 {
  background-color: var(--face-3-color) !important;
}

.die-face-4 {
  background-color: var(--face-4-color) !important;
}

.die-face-5 {
  background-color: var(--face-5-color) !important;
}

.die-face-6 {
  background-color: var(--face-6-color) !important;
}

/* ============================================
   RESET AND BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-size: 16px;
}

.tooltip-icon {
  color: #555;
  font-size: 1rem;
  cursor: help;
}

.tooltip-text {
  text-align: center;
  position: absolute;
  left: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  background-color: white;
  transform: translateY(80%);

  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
  width: max-content;
  max-width: min(260px, 80vw);
  white-space: normal;
  overflow-wrap: anywhere;
  opacity: 0; /* hidden by default */
  pointer-events: none; /* avoids blocking hover */
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 100;
}

.tooltip:hover .tooltip-text,
.tooltip:focus-within .tooltip-text,
.tooltip.is-open .tooltip-text {
  opacity: 1;
  transform: translateY(-20);
  pointer-events: auto;
}
.tooltip {
  display: flex; /* flex container */
  align-items: center; /* vertically center items */
  justify-content: flex-start; /* left-align children */
  position: relative; /* for the tooltip positioning */
  gap: 0.5rem; /* space between text and icon */
  overflow: visible;
  cursor: default; /* indicate non-clickable */
}

body {
  margin: 0;
  touch-action: manipulation;
  min-height: -webkit-fill-available;
  overflow: hidden;
  font-family: "Spartan MB", sans-serif;
  font-weight: 500;
  font-optical-sizing: auto;
  font-style: normal;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.64), transparent 34%),
    linear-gradient(145deg, #ff6b57 0%, #ff523d 44%, #ff725f 100%);
  height: 100dvh;
  display: flex;
  justify-items: center;
  align-items: center;
}

body.theory-mode {
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  min-height: 100dvh;
  display: block;
  align-items: stretch;
}

#page {
  display: flex;
  flex-direction: row;
  z-index: 10;
  pointer-events: auto;
  align-items: center;
  width: 100%;
  justify-content: center;
  overflow: visible;
  position: relative;
  min-height: 100dvh;
}

img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}

/* ============================================
   DICE CONTAINER AND ITEMS
   ============================================ */
.dice-container {
  --grid-hit-overflow-pad: calc(var(--dice-size, 80px) * 0.09);
  --grid-loop-bracket-pad: calc(var(--dice-size, 80px) * 0.01);
  --dice-gap: 12px;
  --grid-visible-max-height: calc((var(--dice-size, 80px) * 4) + (var(--dice-gap) * 3));
  display: grid;
  grid-template-columns: repeat(var(--grid-rows), auto);
  grid-template-rows: repeat(var(--grid-columns), auto);
  grid-auto-flow: row;
  gap: var(--dice-gap);
  width: fit-content;
  max-width: min(100vw - 20px, 100%);
  padding-top: calc(var(--dice-size, 80px) * 0.08);
  padding-bottom: var(--grid-hit-overflow-pad);
  padding-left: calc(var(--grid-loop-bracket-pad) + (var(--dice-size, 80px) * 0.08));
  padding-right: calc(var(--grid-loop-bracket-pad) + (var(--dice-size, 80px) * 0.08));
  max-height: calc(
    var(--grid-visible-max-height) + var(--grid-hit-overflow-pad) + 1px
  );
  overflow-y: auto;
  overflow-x: auto;
  scroll-behavior: auto !important;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  pointer-events: auto;

  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
  transform: height 0.3s ease;
}

.dice-container::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.item {
  position: relative;
  pointer-events: auto !important;
  z-index: 1;
  cursor: grab;
  border-radius: 12px;
  width: calc(var(--dice-size, 80px));
  height: calc(var(--dice-size, 80px));
  overflow: hidden !important;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.2s;
  contain: layout style;
  transform-origin: center;
  margin: 0;
  will-change: transform;
}

.item.hold-note {
  background: var(--block-inactive-color, darkgray) !important;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  padding: 0 calc(var(--dice-size, 80px) * 0.12);
}

.item.hold-note.hold-note-active {
  background: var(
    --hold-active-color,
    var(--hold-note-active-2-color, #ffa84d)
  ) !important;
}

/* Removed hover for mobile app */
/* .item:hover {
  background-color: var(
    --hover-face-color,
    var(--block-inactive-color, darkgray)
  );
} */

/* Removed hover for mobile app */
/* .item.hold-note:hover, */
.item.hold-note.hold-hover {
  background: var(
    --hold-active-color,
    var(--hold-note-active-2-color, #ffa84d)
  ) !important;
}

.item.dotted-quarter-note {
  border-radius: 12px;
  padding: calc(var(--dice-size, 80px) * 0.025);
  background: transparent !important;
}

.dotted-quarter-layout {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  gap: calc(var(--dice-size, 80px) * 0.04);
}

.dq-segment {
  height: 100%;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.22s ease, opacity 0.22s ease;
}

.dq-main {
  flex: 2;
  background: var(--block-inactive-color, darkgray);
}

.dq-tail {
  flex: 1;
  min-width: calc(var(--dice-size, 80px) * 0.42);
  background: var(--face-2-color, #70b8fe);
  opacity: 1;
}

.dq-segment.dq-muted {
  opacity: 0.45;
}

/* Removed hover for mobile app */
/* .item.dotted-quarter-note:hover .dq-main {
  background: var(--face-1-color, #fb6354);
}

.item.dotted-quarter-note:hover .dq-tail {
  background: var(--face-2-color, #70b8fe);
} */

.item.dotted-quarter-note.dq-main-active .dq-main {
  background: var(--face-1-color, #fb6354);
}

.item.dotted-quarter-note.dq-tail-active .dq-tail {
  background: var(--face-2-color, #70b8fe);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.item.dotted-quarter-note .dot {
  background-color: rgba(255, 255, 255, 0.95);
}

.item.split-note {
  border-radius: 12px;
  overflow: visible !important;
}

.item.split-note .judgement {
  width: max-content;
  min-width: 100%;
  white-space: nowrap;
}

.item.split-note.split-eighth {
  background: var(--block-inactive-color, darkgray) !important;
}

.item.split-note.split-sixteenth {
  background: var(--block-inactive-color, darkgray) !important;
}

.item.split-note.split-note-active.split-eighth {
  background: var(--face-2-color, #70b8fe) !important;
}

.item.split-note.split-note-active.split-sixteenth {
  background: var(--face-4-color, #c739ff) !important;
}

.item.split-note.split-muted {
  opacity: 0.5;
}

.hold-continuation {
  height: calc(var(--dice-size, 80px));
  border-radius: 12px;
  background: var(--block-inactive-color, darkgray);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 calc(var(--dice-size, 80px) * 0.12);
  margin: calc(var(--dice-size, 80px) * 0.06);
  pointer-events: none;
  transition: background-color 0.22s ease;
}

.hold-continuation.hold-note-active {
  background: var(
    --hold-active-color,
    var(--hold-note-active-2-color, #ffa84d)
  );
}

.hold-continuation.hold-hover {
  background: var(
    --hold-active-color,
    var(--hold-note-active-2-color, #ffa84d)
  );
}

.hold-fill-track {
  position: relative;
  width: 100%;
  height: calc(var(--dice-size, 80px) * 0.18);
  background: var(--dot-color, #000000);
  border-radius: 999px;
  overflow: hidden;
}

.hold-fill-progress {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(0);
  background: var(--dot-hit-color, #ffffff);
  border-radius: 999px;
}

.hold-fill-progress.hold-manual-fill {
  background: var(--dot-hit-color, #ffffff);
}

.hold-fill-progress.hold-final-black {
  background: var(--dot-hit-color, #ffffff);
}

.item-inactive {
  background-color: var(--block-inactive-color) !important;
}

.die-wrapper {
  overflow: visible !important;
  position: relative;
  z-index: 2;
  contain: layout;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-items: center;
  gap: calc(var(--dice-size, 80px) * 0.08);
  padding-bottom: calc(var(--dice-size, 80px) * 0.06);
}

.practice-grid-placeholder {
  pointer-events: none;
}

.practice-grid-placeholder-card {
  position: relative;
  display: grid;
  place-items: center;
  width: calc(var(--dice-size, 80px));
  height: calc(var(--dice-size, 80px));
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(232, 227, 223, 0.92), rgba(214, 208, 203, 0.96)),
    rgba(210, 204, 199, 0.92);
  border: 1px dashed rgba(120, 98, 91, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  opacity: 0.96;
}

.practice-grid-placeholder-card::before {
  content: "";
  width: calc(var(--dice-size, 80px) * 0.16);
  height: calc(var(--dice-size, 80px) * 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 2px rgba(76, 37, 31, 0.08);
}

.practice-grid-placeholder-bar {
  width: calc(var(--dice-size, 80px) * 0.74);
  height: calc(var(--dice-size, 80px) * 0.12);
  border-radius: 999px;
  background: rgba(205, 198, 194, 0.5);
}

.assessment-progress {
  width: calc(100% - (var(--dice-size, 80px) * 0.12));
  min-height: 7px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
}

.assessment-progress-segment {
  height: 7px;
  border-radius: 999px;
  background: rgba(42, 32, 29, 0.12);
  transform: scaleX(1);
  transform-origin: center;
  transition:
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.assessment-progress-segment.is-filled {
  background: linear-gradient(180deg, #ff8a79 0%, #ff523d 100%);
  box-shadow: 0 0 10px rgba(255, 82, 61, 0.28);
}

.assessment-hit-flash .assessment-progress-segment.is-filled {
  box-shadow: 0 0 12px rgba(61, 214, 122, 0.35);
}

.item.assessment-hit-flash {
  box-shadow:
    0 0 0 2px rgba(61, 214, 122, 0.95),
    0 0 22px rgba(61, 214, 122, 0.42);
}

.item.assessment-miss-flash {
  box-shadow:
    0 0 0 2px rgba(255, 89, 94, 0.92),
    0 0 22px rgba(255, 89, 94, 0.38);
}

.dot.assessment-pop {
  animation: assessmentDotPop 240ms cubic-bezier(0.22, 1.3, 0.36, 1);
}
.dot-checkbox {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid darkgray;
  background-color: #eee;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.dot-checkbox:checked {
  background-color: #fb6354;
  border-color: #c74e42;
}

/* ============================================
   DICE FACES
   ============================================ */
.first-face {
  display: flex;
  justify-content: center;
  align-items: center;
}

.second-face {
  display: flex;
  justify-content: center;
  gap: calc(var(--dice-size, 80px) * 0.15);
}

.third-face {
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: calc(var(--dice-size, 80px) * 0.15);
}

.third-face .column {
  overflow: visible;
  display: flex;
  flex-direction: row;
  gap: calc(var(--dice-size, 80px) * 0.15);
  justify-content: center;
}

.fourth-face {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--dice-size, 80px) * 0.15);
}

.fourth-face .column {
  overflow: visible;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: calc(var(--dice-size, 80px) * 0.15);
  justify-content: space-between;
}

.fifth-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: var(--dice-size, 80px);
  height: var(--dice-size, 80px);
  gap: calc(var(--dice-size, 80px) * 0.075);
}

.fifth-face .row-1 {
  overflow: visible;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.fifth-face .row-2 {
  overflow: visible;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: calc(var(--dice-size, 80px) * 0.3);
}

.fifth-face .row-3 {
  overflow: visible;
  display: flex;
  flex-direction: row;
  gap: calc(var(--dice-size, 80px) * 0.15);
}

.sixth-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: var(--dice-size, 80px);
  height: var(--dice-size, 80px);
  gap: calc(var(--dice-size, 80px) * 0.075);
}

.sixth-face .row-1,
.sixth-face .row-2 {
  overflow: visible;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: calc(var(--dice-size, 80px) * 0.15);
}

.sixth-face .row-3 {
  overflow: visible;
  display: flex;
  flex-direction: row;
  gap: calc(var(--dice-size, 80px) * 0.15);
}

/* ============================================
   DOTS
   ============================================ */
.dot {
  display: block;
  width: calc(var(--dice-size, 80px) * 0.15);
  height: calc(var(--dice-size, 80px) * 0.15);
  border-radius: 50%;
  flex-shrink: 0;
  flex-grow: 0;
  background-color: var(--dot-color, black);
}
.dot-onboarding {
  display: block;
  width: calc(var(--dice-size, 80px) * 0.15);
  height: calc(var(--dice-size, 80px) * 0.15);
  border-radius: 50%;
  flex-shrink: 0;
  flex-grow: 0;
  background-color: black !important;
}

.music-symbols-enabled #dice-container .item .dot,
.music-symbols-enabled #sidebar-wrapper .dice-preview .item .dot,
.music-symbols-enabled #block-selection-modal .dice-preview .item .dot {
  opacity: 0 !important;
}

.music-symbols-enabled #dice-container .item .dot.hit,
.music-symbols-enabled #sidebar-wrapper .dice-preview .item .dot.hit,
.music-symbols-enabled #block-selection-modal .dice-preview .item .dot.hit {
  animation: none !important;
}

.music-symbol-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.music-symbol-number {
  position: absolute;
  top: 8%;
  left: 56%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-color, #111);

  pointer-events: none;
}

.music-symbol-overlay.hold-symbol-left {
  justify-content: flex-start !important;
  padding-left: 0 !important;
}

.music-symbol-overlay.hold-symbol-left img,
.music-symbol-overlay.hold-symbol-left svg {
  width: calc(var(--dice-size, 80px) * 0.9) !important;
  max-width: calc(var(--dice-size, 80px) * 0.9);
  flex: 0 0 auto;
}

.music-symbol-overlay img,
.music-symbol-overlay svg {
  width: 90%;
  height: 40%;
  object-fit: scale-down;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.music-symbol-overlay .music-notehead {
  transition: fill 0.2s ease, fill-opacity 0.2s ease, stroke-opacity 0.2s ease;
  transform-box: fill-box;
  transform-origin: center center;
  vector-effect: non-scaling-stroke;
  will-change: transform;
  backface-visibility: hidden;
}

.music-symbols-enabled #dice-container .item.hold-note .hold-fill-track,
.music-symbols-enabled
  #sidebar-wrapper
  .dice-preview
  .item.hold-note
  .hold-fill-track,
.music-symbols-enabled
  #block-selection-modal
  .dice-preview
  .item.hold-note
  .hold-fill-track {
  display: none !important;
}

.music-symbols-enabled #dice-container .item.hold-note .music-symbol-overlay,
.music-symbols-enabled
  #sidebar-wrapper
  .dice-preview
  .item.hold-note
  .music-symbol-overlay,
.music-symbols-enabled
  #block-selection-modal
  .dice-preview
  .item.hold-note
  .music-symbol-overlay {
  justify-content: flex-start;
  padding-left: calc(var(--dice-size, 80px) * 0.25);
}

.dot.hit {
  animation: dot-hit 0.3s ease-out forwards;
}

.dot.silent {
  opacity: 0.2;
}

.silent .hit {
  animation: silent-hit 0.3s ease-out forwards !important;
}

/* ============================================
   CONTAINER BACKGROUND
   ============================================ */
#container-bg {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 60px;
  padding: 2.8rem 2.5rem 2.8rem;
  border-radius: clamp(15px, 3vw, 28.8px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 244, 241, 0.98));
  width: min(
    calc(
      (var(--dice-size, 80px) * var(--grid-visible-columns, 16)) +
        (var(--dice-size, 80px) * 0.12 * var(--grid-visible-columns, 16)) + 5rem
    ),
    calc(100vw - 20px)
  );
  max-height: (var(--dice-size, 80px) * 4) + (var(--dice-size, 80px) * 0.06 * 8);
  z-index: 0;
  pointer-events: auto;

  contain: layout; /* Changed from 'paint' */
  overflow: visible;
  /* Smooth transition for size changes */
  transition: padding 0.3s ease, border-radius 0.3s ease;
  box-shadow:
    0 26px 70px rgba(100, 22, 11, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

#container-bg h2{
  align-self: center;
  font-weight: bold;
  font-size:  clamp(1.5rem, 5vw, 2.5rem);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

#container-bg > * {
  pointer-events: auto;
}

/* ============================================
   SETTINGS PANEL
   ============================================ */
/* ============================================
   MODERN SIDEBARS (General & Project)
   ============================================ */
.settings-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  z-index: 4000;
  padding: 0;
  transition: opacity 0.3s ease;
}

.settings-wrapper.hidden {
  display: none !important;
}

#countdown .active {
  background-color: black !important;
}
.settings {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0;
}

.setting-section {
  width: 100%;
  border-bottom: #eee 1px solid;
  font-size: 1.1rem;
  font-weight: 700;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.close-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 6px 8px;
  transition: color 0.15s ease;
}

/* ============================================
   FORM CONTROLS
   ============================================ */
.color-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-input-wrapper .dot-color-picker,
.color-input-wrapper #block-color-picker {
  width: 40px;
  height: 30px;
  border: none;
  background: none;
  cursor: pointer;
}

.color-preview {
  font-size: 14px;
  color: #333;
}

.combobox-wrapper {
  display: flex;
  width: 100%;
  overflow: visible;
  align-items: center;
  justify-content: space-between;
}

.combobox-wrapper p {
  margin: 0;
  font-weight: 500;
  font-size: 1rem;
}

.combobox {
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: white;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.combobox:focus {
  outline: none;
  border-color: #f85c48;
  box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.settings-drawer {
  width: 100%;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #f8f9fb;
}

.settings-drawer-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 0.8rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.settings-drawer-summary::-webkit-details-marker {
  display: none;
}

.settings-drawer-copy {
  min-width: 0;
}

.settings-drawer-title {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: #333;
}

.settings-drawer-subtitle {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #7b7f86;
}

.settings-drawer-right {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.settings-drawer-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.settings-drawer-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.settings-drawer-summary svg.fa-solid {
  color: #666;
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.settings-drawer[open] .settings-drawer-summary svg.fa-solid {
  transform: rotate(180deg);
}

.settings-drawer-body {
  padding: 0.2rem 0.8rem 0.8rem;
}

.block-color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.block-color-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: 10px;
  border: 1px solid #ededed;
  background: #fff;
}

.block-color-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.block-color-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.block-color-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #4a4a4a;
}

.form-group .block-color-item .compact-color-input {
  width: 2rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: none;
}

.form-group
  .block-color-item
  .compact-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.form-group .block-color-item .compact-color-input::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.form-group .block-color-item .compact-color-input::-moz-color-swatch {
  border: none;
  border-radius: 6px;
}

@media (max-width: 520px) {
  .block-color-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   BPM BUTTON & CHIPS
   ============================================ */
.bpm-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.bpm-chip {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #555;
}

.bpm-chip:active {
  transform: translateY(0);
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 15px;
  border-radius: 50px !important;
  background: #d3d3d3;
  outline: none;
 
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #fb6354;
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #fb6354;
  cursor: pointer;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  margin: 0 10px;
  cursor: pointer;
}

.switch input {
  transform: scale(1);
}

/* ============================================
   KEYBIND CONTROLS
   ============================================ */
.keybind-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid #ccc;
  width: 100%;
  border-radius: 6px;
  background: #f9f9f9;
}

.keybind-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.keybind-tag {
  background: #f87867;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.keybind-tag button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

#add-keybind-btn {
  padding: 6px 12px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  background: #f85c48;
  color: white;
  cursor: pointer;
}

#cancel-btn {
  margin-top: 10px;
  padding: 6px 12px;
  background: #ccc;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

#offset-wizard-modal {
  z-index: 5000;
}

.wizard-title {
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  letter-spacing: 0.24em;
  font-weight: 700;
}

.wizard-main p {
  margin: 0;
  opacity: 0.85;
  font-size: clamp(1.05rem, 2.6vw, 1.45rem);
  line-height: 1.4;
  max-width: min(70ch, 86vw);
}

.wizard-status {
  margin-top: 0.5rem;
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  font-weight: 700;
}

.wizard-meter {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: clamp(12px, 3vh, 24px) 0;
}

.wizard-icon {
  width: clamp(7.5rem, 34vw, 12rem);
  height: auto;
  max-width: 75%;
  display: block;
}

.wizard-tap-btn {
  font-size: clamp(1.6rem, 5.6vw, 2.6rem);
  padding: 1.4rem 4.2rem;
  height: auto;
  min-width: min(620px, 92vw);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.wizard-tap-btn.is-hidden {
  display: none;
}

.wizard-status {
  font-size: clamp(1rem, 2.4vw, 1.4rem);
  font-weight: 600;
  min-height: 1.6em;
}

.wizard-bottom {
  width: min(520px, 92vw);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wizard-hidden {
  display: none !important;
}

.wizard-finish {
  position: absolute;
  inset: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.wizard-finish-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.wizard-check {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 4px solid #f85c48;
  color: #f85c48;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
}

.wizard-finish-title {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 700;
}

.wizard-finish-text {
  margin: 0;
  opacity: 0.8;
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  max-width: min(60ch, 82vw);
}

.wizard-link-btn {
  background: none;
  border: none;
  font-size: clamp(0.9rem, 2.2vw, 1.1rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: #111;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}

.wizard-link-btn.secondary {
  color: #f85c48;
}

#keybind-modal {
  z-index: 5000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--modal-bg);
  padding: 20px 30px;
  border-radius: 10px;
  text-align: center;
  color: var(--text-color);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn,
.bb-button {
  font-family: "Spartan MB", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  border: none;
  outline: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.3s ease;
}

button,
.bb-button,
.small-btn {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  outline: none;
}

button:focus-visible,
.bb-button:focus-visible,
.small-btn:focus-visible {
  outline: 2px solid #ff523d;
  outline-offset: 2px;
}

.bb-button {
  width: fit-content;
  padding: .5rem;
  background: #ff523d;
  color: #fff;
  border-radius: clamp(0.3rem, 0.5vw, 0.45rem);
  box-shadow:
    0 clamp(2px, 0.4vw, 3.6px) clamp(3px, 0.6vw, 5.4px) rgba(88, 18, 9, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-size: clamp(12px, 1.5vw, 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.pattern-file-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pattern-file-actions .bb-button {
  flex: 1 1 220px;
  width: 100%;
  min-width: 180px;
}

.auth-modal {
  z-index: 10000;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

#auth-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 12, 11, 0.7) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2147483000 !important;
}

#auth-modal.hidden {
  display: none !important;
}

#auth-modal .auth-content {
  width: min(560px, calc(100vw - 32px));
  max-height: min(92dvh, 760px);
  overflow: auto;
  background: rgba(255, 250, 248, 0.98) !important;
  color: #251c1a !important;
  border: 1px solid rgba(76, 37, 31, 0.12);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

#auth-modal input,
#auth-modal select {
  background: #fff !important;
  color: #251c1a !important;
}

.theory-access-modal {
  z-index: 10010;
  background: rgba(11, 8, 7, 0.72);
  backdrop-filter: blur(10px);
}

.theory-access-content {
  width: min(420px, calc(100vw - 28px));
  border-radius: 18px;
  padding: 1.2rem;
  text-align: left;
}

.theory-access-header {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.theory-access-header h2 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.05;
  color: var(--text-color);
}

.theory-access-header p {
  margin: 0;
  color: #6f5954;
  font-size: 0.92rem;
}

.theory-access-field {
  display: grid;
  gap: 0.45rem;
}

.theory-access-field span {
  font-size: 0.84rem;
  font-weight: 700;
  color: #6f5954;
}

.theory-access-field input {
  width: 100%;
  border: 1px solid rgba(58, 31, 26, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  color: #231917;
  padding: 0.9rem 1rem;
  font-size: 1rem;
}

.theory-access-field input:focus {
  outline: 2px solid rgba(255, 82, 61, 0.22);
  border-color: rgba(255, 82, 61, 0.34);
}

.theory-access-status {
  min-height: 1.2rem;
  margin: 0.7rem 0 0;
  font-size: 0.88rem;
  color: #6f5954;
}

.theory-access-status[data-tone="error"] {
  color: #c23422;
}

.theory-access-actions {
  margin-top: 0.9rem;
  justify-content: flex-end;
  gap: 0.65rem;
}

.auth-content {
  width: min(520px, calc(100vw - 28px));
  max-height: min(92vh, 720px);
  border-radius: 14px;
  padding: 1.25rem;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.auth-brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(255, 82, 61, 0.18);
}

.auth-brand h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
}

.auth-brand p {
  margin: 0.25rem 0 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.35;
}

.auth-mark {
  flex: 0 0 auto;
  transform: scale(0.86);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-section-title {
  color: #ff523d;
  font-size: 0.95rem;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-form select {
  width: 100%;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.auth-actions .bb-button {
  min-width: 0;
  width: 100%;
}

.auth-status {
  color: #666;
  font-weight: 700;
  font-size: 0.88rem;
  min-height: 1.2em;
}

.auth-status[data-tone="ok"],
.online-cadence-status[data-tone="ok"] {
  color: #2f7d32;
}

.auth-status[data-tone="error"],
.online-cadence-status[data-tone="error"] {
  color: #b3261e;
}

.auth-mini-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 1.2rem;
  color: #666;
  font-size: 0.82rem;
  font-weight: 700;
}

.auth-mini-row .wizard-link-btn {
  padding: 0;
  min-width: 0;
  color: #f85c48;
}

.online-cadence-panel {
  border: 1px solid #e4e4e4;
  border-radius: 10px;
  padding: 1rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.online-cadence-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.online-cadence-header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
}

.cadence-create-btn {
  min-width: 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.online-cadence-header label {
  margin-bottom: 0.2rem;
}

.cadence-library-modal {
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 0 !important;
  z-index: 4050;
}

.cadence-library-sheet {
  width: min(760px, 100vw);
  max-width: 100vw;
  max-height: min(78dvh, 720px);
  border-radius: 26px 26px 0 0;
  background: var(--modal-bg);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -16px 40px rgba(37, 28, 26, 0.22);
  animation: cadenceSheetIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.cadence-library-sheet-handle {
  width: 54px;
  height: 5px;
  border-radius: 999px;
  background: rgba(37, 28, 26, 0.15);
  margin: 0.85rem auto 0.25rem;
}

.cadence-library-sheet .online-cadence-panel {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0.9rem 1rem calc(1.15rem + env(safe-area-inset-bottom, 0px));
  min-height: 240px;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.online-cadence-header p,
.online-cadence-status,
.online-cadence-desc,
.online-cadence-meta {
  font-size: 0.85rem;
  line-height: 1.35;
}

.online-cadence-header p {
  margin: 0;
  color: #666;
}

.online-cadence-status {
  color: #666;
}

.online-cadence-status[data-tone="ok"] {
  color: #2f7d32;
}

.online-cadence-status[data-tone="error"] {
  color: #b3261e;
}

.online-cadence-list {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.15rem;
  -webkit-overflow-scrolling: touch;
}

.online-cadence-list > * + * {
  margin-top: 0.9rem;
}

.online-cadence-section {
  display: grid;
  gap: 0.55rem;
}

.online-cadence-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: #1f1f1f;
}

.online-cadence-section-title strong {
  font-size: 0.95rem;
}

.online-cadence-section-title span {
  border: 1px solid #eeeeee;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: #ffffff;
  color: #666666;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.online-cadence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.65rem;
}

.online-cadence-card {
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.72rem;
  display: grid;
  gap: 0.4rem;
  text-align: left;
  color: #222;
  min-height: 150px;
  align-content: start;
  cursor: pointer;
}

.online-cadence-card:active {
  transform: scale(0.99);
}

.exercise-selection-card.is-selected {
  border-color: #f85c48;
  box-shadow: 0 0 0 2px rgba(248, 92, 72, 0.12);
}

.online-cadence-group,
.online-cadence-admin-actions {
  color: #666;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.online-cadence-title {
  font-weight: 800;
  font-size: 0.95rem;
}

.online-cadence-meta {
  color: #f85c48;
  font-weight: 700;
}

.online-cadence-desc {
  color: #666;
}

.online-cadence-preview {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow: hidden;
  padding: 0.18rem 0;
}

.cadence-preview-block {
  width: 22px;
  height: 34px;
  flex: 0 0 22px;
  border: 1px solid #1f1f1f;
  border-radius: 5px;
  background: #f5f5f5;
  display: grid;
  place-items: center;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  padding: 3px;
}

.cadence-preview-block[data-value="1"] {
  background: var(--face-1-color, #fb6354);
}

.ghost-metronome-screen-root {
  position: fixed;
  inset: 0;
  z-index: 2147483200;
  background: linear-gradient(180deg, #fffaf8 0%, #fff2ec 100%);
}

.ghost-metronome-screen-root.hidden {
  display: none;
}

.ghost-metronome-screen {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 0.55rem;
  width: min(1180px, 100vw);
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(0.75rem + env(safe-area-inset-top, 0px)) 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}

.ghost-metronome-screen.is-exercise-2-premium {
  width: 100vw;
  min-height: 100dvh;
  grid-template-rows: auto auto auto auto 1fr auto;
  gap: 0.9rem;
  padding: calc(0.8rem + env(safe-area-inset-top, 0px)) 1.5rem calc(0.8rem + env(safe-area-inset-bottom, 0px));
  color: #dffcff;
}

.ghost-metronome-screen-root[data-ghost-exercise="exercise-2"] {
  background:
    radial-gradient(circle at 50% 0%, rgba(130, 252, 255, 0.16), transparent 28%),
    radial-gradient(circle at 12% 24%, rgba(0, 225, 255, 0.12), transparent 22%),
    radial-gradient(circle at 88% 18%, rgba(0, 148, 255, 0.12), transparent 22%),
    linear-gradient(180deg, #02131d 0%, #06273a 42%, #083a54 100%);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] {
  color: #dffcff;
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-heading h3 {
  font-size: clamp(1.55rem, 2.8vw, 2.35rem);
  color: #effdff;
  text-shadow: 0 0 24px rgba(0, 226, 255, 0.14);
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-header p {
  max-width: 72ch;
  color: rgba(214, 243, 248, 0.88);
  font-size: 0.95rem;
  line-height: 1.38;
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-header label,
.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-timeline-title.is-audible,
.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-timeline-title.is-ghost {
  color: #7ff7ff;
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-back,
.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-calibrate-btn,
.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-start-btn,
.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-challenge-btn,
.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-challenge-timer,
.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-pad,
.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-status {
  border-color: rgba(95, 235, 255, 0.18);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-status,
.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-pad,
.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-challenge-timer {
  background: linear-gradient(180deg, rgba(9, 40, 58, 0.92), rgba(7, 31, 45, 0.92));
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-status strong,
.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-status span,
.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-pad strong,
.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-pad span,
.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-combo-hud strong,
.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-combo-hud span {
  color: #f3fbff;
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-header {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-heading {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-heading label {
  font-size: 0.88rem;
  letter-spacing: 0.14em;
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-back,
.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-calibrate-btn,
.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-start-btn {
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(127, 247, 255, 0.28);
  background: linear-gradient(180deg, rgba(244, 252, 255, 0.98), rgba(221, 244, 250, 0.92));
  color: #0b2432;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.46);
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-topbar {
  gap: 0.5rem;
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-topblock {
  min-height: 22px;
  border-color: rgba(122, 241, 255, 0.18);
  background: rgba(3, 24, 34, 0.42);
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-topblock strong {
  color: rgba(222, 250, 255, 0.72);
}

.ghost-metronome-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 0.9rem;
}

.ghost-metronome-back {
  align-self: start;
  height: 36px;
  padding: 0 0.9rem;
  border: 1px solid rgba(31, 31, 31, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: #251c1a;
  font-weight: 800;
}

.ghost-metronome-heading {
  text-align: center;
}

.ghost-metronome-combo-hud {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 86px;
  gap: 0.2rem;
  text-align: center;
}

.ghost-metronome-combo-hud strong {
  font-size: clamp(1.2rem, 2.3vw, 1.8rem);
  line-height: 1;
  color: #251c1a;
  font-weight: 900;
}

.ghost-metronome-combo-hud strong.is-bouncing {
  animation: ghostComboBounce 320ms ease;
}

.ghost-metronome-combo-hud span {
  color: #6a5a56;
  font-size: 0.84rem;
  font-weight: 800;
}

.ghost-metronome-challenge-hud {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.ghost-metronome-challenge-btn {
  width: 114px;
  height: 114px;
  border-radius: 50%;
  border: 1px solid rgba(31, 31, 31, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,245,241,0.96));
  color: #251c1a;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(36, 15, 12, 0.08);
}

.ghost-metronome-challenge-btn.is-active,
.ghost-metronome-challenge-btn:disabled {
  background: linear-gradient(180deg, rgba(255, 82, 61, 0.96), rgba(230, 74, 54, 0.96));
  color: #fff;
  opacity: 1;
}

.ghost-metronome-challenge-timer {
  min-width: 164px;
  text-align: center;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(31,31,31,0.08);
  color: #6f5954;
  font-size: 0.88rem;
  font-weight: 800;
}

.ghost-metronome-challenge-timer.is-active {
  color: #ff523d;
  border-color: rgba(255, 82, 61, 0.24);
}

@keyframes ghostComboBounce {
  0% { transform: scale(1); }
  35% { transform: scale(1.18); }
  65% { transform: scale(0.94); }
  100% { transform: scale(1); }
}

.ghost-metronome-header label {
  display: inline-block;
  margin-bottom: 0.15rem;
  color: #f85c48;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ghost-metronome-header h3 {
  margin: 0;
  color: #251c1a;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  line-height: 1.05;
}

.ghost-metronome-header p {
  margin: 0.25rem auto 0;
  max-width: 62ch;
  color: #666;
  line-height: 1.24;
  font-size: 0.82rem;
}

.ghost-metronome-timeline-headings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  align-items: end;
}

.ghost-metronome-timeline-title {
  text-align: center;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ghost-metronome-timeline-title.is-audible {
  color: #16703d;
}

.ghost-metronome-timeline-title.is-ghost {
  color: #666;
}

.ghost-metronome-topbar {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.35rem;
}

.ghost-metronome-topblock {
  min-height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(31, 31, 31, 0.08);
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.ghost-metronome-topblock strong {
  font-size: 0.58rem;
  line-height: 1;
  color: rgba(37, 28, 26, 0.66);
}

.ghost-metronome-topblock.is-audible {
  background: linear-gradient(180deg, rgba(55, 187, 102, 0.35), rgba(55, 187, 102, 0.16));
}

.ghost-metronome-topblock.is-ghost {
  background: linear-gradient(180deg, rgba(181, 181, 181, 0.3), rgba(181, 181, 181, 0.14));
}

.ghost-metronome-topblock.is-active {
  border-color: #f85c48;
  box-shadow: 0 0 0 2px rgba(248, 92, 72, 0.18);
  transform: translateY(-1px);
}

.ghost-metronome-center {
  display: grid;
  align-content: center;
  gap: 1.2rem;
  min-height: 0;
}

.ghost-metronome-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  justify-items: center;
}

.ghost-metronome-circle-card {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.6rem;
  text-align: center;
  min-height: 176px;
  width: 100%;
  transition: transform 0.16s ease;
}

.ghost-metronome-circle-card > span {
  font-size: 0.6rem;
  line-height: 1.14;
  font-weight: 800;
  text-transform: uppercase;
  max-width: 12ch;
}

.ghost-metronome-circle-card.is-audible > span {
  color: #16703d;
}

.ghost-metronome-circle-card.is-ghost > span {
  color: #666;
}

.ghost-metronome-circle-card.is-active {
  transform: translateY(-1px);
}

.ghost-metronome-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #d9d9d9;
  box-shadow: inset 0 0 0 1px rgba(31, 31, 31, 0.08);
  display: grid;
  place-items: center;
  align-content: center;
  justify-items: center;
  gap: 0.3rem;
  color: #fff;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.ghost-metronome-glyph {
  width: 30px;
  height: 30px;
  display: block;
}

.ghost-metronome-circle strong {
  font-size: 0.98rem;
  line-height: 1;
  color: #fff;
  font-weight: 900;
}

.ghost-metronome-circle-card.is-audible .ghost-metronome-circle {
  background: #37bb66;
}

.ghost-metronome-circle-card.is-audible.is-filled .ghost-metronome-circle {
  background: #0d7f3b;
}

.ghost-metronome-circle-card.is-ghost .ghost-metronome-circle {
  background: #b9b9b9;
}

.ghost-metronome-circle-card.is-active .ghost-metronome-circle {
  transform: scale(1.06);
  box-shadow: 0 0 0 6px rgba(248, 92, 72, 0.14);
}

.ghost-metronome-footer {
  display: grid;
  gap: 0.5rem;
  position: sticky;
  bottom: 0;
  padding-top: 0.15rem;
  background: linear-gradient(180deg, rgba(255, 250, 248, 0), rgba(255, 250, 248, 0.94) 18%, rgba(255, 250, 248, 1) 42%);
}

.ghost-metronome-footer-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: center;
}

.ghost-metronome-status {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.82rem;
  border-radius: 14px;
  background: rgba(248, 248, 248, 0.98);
  border: 1px solid rgba(31, 31, 31, 0.06);
}

.ghost-metronome-status strong {
  font-size: 0.86rem;
  color: #251c1a;
}

.ghost-metronome-status span {
  color: #666;
  font-size: 0.74rem;
}

.ghost-metronome-calibrate-btn,
.ghost-metronome-start-btn {
  height: 42px;
  padding: 0 0.9rem;
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: #251c1a;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(36, 15, 12, 0.06);
}

.ghost-metronome-calibrate-btn--top {
  justify-self: end;
}

.ghost-metronome-start-btn {
  min-width: 140px;
}

.ghost-metronome-start-btn:disabled {
  opacity: 1;
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 82, 61, 0.96), rgba(230, 74, 54, 0.96));
}

.ghost-metronome-precision-track {
  position: relative;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(31, 31, 31, 0.08);
  background: linear-gradient(180deg, rgba(241, 241, 241, 0.98), rgba(224, 224, 224, 0.96));
  overflow: hidden;
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-precision-track {
  min-height: 58px;
  background: linear-gradient(180deg, rgba(7, 42, 58, 0.98), rgba(10, 62, 84, 0.96));
  border-color: rgba(95, 235, 255, 0.3);
}

.ghost-metronome-perfect-band {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 132px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(47, 179, 87, 0.18);
  z-index: 1;
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-perfect-band {
  width: 190px;
  background: rgba(87, 255, 157, 0.24);
  border: 1px solid rgba(98, 255, 166, 0.45);
}

.ghost-metronome-precision-cursor {
  position: absolute;
  top: 7px;
  bottom: 7px;
  width: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 118, 87, 0.95), rgba(255, 77, 66, 0.95));
  transform: translateX(-50%);
  z-index: 4;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.76), 0 0 10px rgba(248, 92, 72, 0.28);
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-precision-cursor {
  width: 16px;
  top: 6px;
  bottom: 6px;
  background: linear-gradient(180deg, rgba(255, 90, 90, 0.98), rgba(221, 48, 48, 0.98));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.82), 0 0 16px rgba(255, 84, 84, 0.36);
}

.ghost-ex2-timeline-shell {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 0.9rem;
  align-items: center;
}

.ghost-ex2-timeline-line {
  width: 100%;
}

.ghost-ex2-perfect-zone {
  display: grid;
  place-items: center;
}

.ghost-ex2-perfect-zone strong {
  color: #dffff0;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ghost-ex2-indicator {
  display: grid;
  place-items: center;
  height: 58px;
  border-radius: 18px;
  font-size: 1.3rem;
  font-weight: 900;
  background: rgba(5, 30, 41, 0.72);
  border: 1px solid rgba(95, 235, 255, 0.18);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.ghost-ex2-indicator.is-early {
  color: #ffe37a;
}

.ghost-ex2-indicator.is-late {
  color: #ff7c7c;
}

.ghost-ex2-indicator.is-flashing,
.ghost-ex2-perfect-zone.is-flashing {
  animation: ghostEx2Flash 280ms ease 2;
}

@keyframes ghostEx2Flash {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-row {
  max-width: none;
  gap: 16px;
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-circle-card > span {
  color: #9ceeff;
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-circle-card.is-audible .ghost-metronome-circle {
  background: linear-gradient(180deg, #00d8ff 0%, #00b7ff 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18), 0 0 28px rgba(0, 225, 255, 0.18);
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-circle-card.is-ghost .ghost-metronome-circle {
  background: linear-gradient(180deg, rgba(14, 84, 109, 0.82), rgba(11, 63, 82, 0.82));
  box-shadow: inset 0 0 0 1px rgba(127, 247, 255, 0.16);
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-circle-card.is-active .ghost-metronome-circle {
  box-shadow: 0 0 0 6px rgba(0, 234, 255, 0.18), 0 0 30px rgba(0, 225, 255, 0.24);
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-topblock.is-audible {
  background: linear-gradient(180deg, rgba(0, 216, 255, 0.34), rgba(0, 216, 255, 0.18));
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-topblock.is-ghost {
  background: linear-gradient(180deg, rgba(14, 84, 109, 0.4), rgba(14, 84, 109, 0.18));
}

.ghost-metronome-screen.is-exercise-2-premium .ghost-metronome-footer {
  background: linear-gradient(180deg, rgba(4, 29, 41, 0), rgba(4, 29, 41, 0.78) 18%, rgba(4, 29, 41, 0.96) 42%);
}

.ghost-metronome-precision-track::before {
  content: "";
  position: absolute;
  inset: 50% 16px auto 16px;
  height: 3px;
  border-radius: 999px;
  background: rgba(120, 120, 120, 0.42);
  transform: translateY(-50%);
}

.ghost-metronome-precision-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.58rem;
  font-weight: 800;
  color: #666;
  z-index: 1;
}

.ranking-screen-root {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2147482800;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.16), transparent 34%),
    linear-gradient(180deg, #b46859 0%, #a04f43 100%);
}

.ranking-screen-root.hidden {
  display: none;
}

.ranking-screen {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 1.1rem;
  padding: 1rem 0 1.2rem;
  padding-top: 5rem;
  color: #251c1a;
}

.ranking-screen-header {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0 1rem;
}

.ranking-screen-back {
  position: fixed;
  top: 1rem;
  left: 1rem;
  height: 42px;
  padding: 0 1rem;
  border-radius: 14px;
  border: 1px solid rgba(31,31,31,0.08);
  background: rgba(255,255,255,0.96);
  color: #251c1a;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(36, 15, 12, 0.06);
  z-index: 3;
}

.ranking-screen-heading {
  display: grid;
  gap: 0.15rem;
  justify-items: center;
  text-align: center;
  color: #fff7f2;
  text-shadow: 0 2px 10px rgba(69, 31, 27, 0.28);
}

.ranking-screen-heading h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3.6vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.ranking-screen-heading p {
  margin: 0;
  color: rgba(255, 245, 238, 0.95);
  line-height: 1.2;
  font-size: 0.98rem;
  font-weight: 500;
}

.ranking-screen-status {
  margin: 0 1rem;
  padding: 0.7rem 1rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255, 246, 240, 0.92);
  font-weight: 700;
}

.ranking-screen-status[hidden] {
  display: none;
}

.ranking-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 1rem;
}

.ranking-tab {
  min-height: 40px;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 247, 243, 0.16);
  color: rgba(255, 246, 240, 0.9);
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.ranking-tab.is-active {
  background: rgba(255, 255, 255, 0.96);
  color: #6a463f;
  border-color: rgba(255, 255, 255, 0.7);
}

.ranking-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 1rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(252,247,244,0.97));
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(56, 20, 15, 0.18);
  overflow: hidden;
}

.ranking-summary-card {
  padding: 1rem 0.8rem;
  min-height: 92px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  background: transparent;
  border-right: 1px solid rgba(78, 48, 40, 0.14);
}

.ranking-summary-card:last-child {
  border-right: 0;
}

.ranking-summary-title {
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #171414;
}

.ranking-summary-value {
  margin-top: 0.35rem;
  font-size: clamp(1.2rem, 2.1vw, 1.9rem);
  font-weight: 900;
  color: #171414;
  line-height: 1.05;
}

.ranking-summary-sub {
  margin-top: 0.2rem;
  color: #6f5954;
  font-size: 0.82rem;
}

.ranking-leaderboard {
  min-height: 0;
  overflow: auto;
  padding: 0 0 0.25rem;
}

.ranking-leaderboard-section {
  display: grid;
  gap: 0.75rem;
}

.ranking-leaderboard-shell {
  margin: 0;
  background: linear-gradient(180deg, rgba(255,252,249,0.985), rgba(250,245,240,0.975));
  border-radius: 26px;
  box-shadow: 0 -2px 0 rgba(255,255,255,0.15), 0 20px 44px rgba(54, 20, 16, 0.22);
  padding: 0.5rem 20px 0.75rem;
  overflow: hidden;
}

.ranking-leaderboard-mode-intro {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 0.85rem;
  padding: 0.25rem 0.1rem 0.5rem;
}

.ranking-leaderboard-mode-icon-slot {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.84), rgba(249,236,229,0.9)),
    linear-gradient(135deg, rgba(255,104,84,0.2), rgba(255,210,120,0.2));
  border: 1px dashed rgba(124, 88, 78, 0.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.ranking-leaderboard-mode-intro strong {
  display: block;
  color: #171414;
  font-size: 0.98rem;
  line-height: 1.04;
}

.ranking-leaderboard-mode-intro span {
  display: block;
  margin-top: 0.18rem;
  color: #6d5248;
  font-size: 0.74rem;
  line-height: 1.35;
}

.ranking-leaderboard-handle {
  width: 56px;
  height: 5px;
  border-radius: 999px;
  background: rgba(47, 36, 34, 0.16);
  margin: 0 auto 1rem;
}

.ranking-leaderboard-head {
  display: grid;
  grid-template-columns: 0.6fr 2fr 2fr 1.2fr 1.2fr 1.2fr;
  gap: 0.4rem;
  align-items: center;
  padding: 0 0 0.5rem;
  color: #171414;
  font-size: 0.56rem;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-align: left;
}

.ranking-leaderboard-head > span:nth-child(n + 4) {
  text-align: center;
}

.ranking-leaderboard-row {
  display: grid;
  grid-template-columns: 0.6fr 2fr 2fr 1.2fr 1.2fr 1.2fr;
  gap: 0.4rem;
  align-items: center;
  padding: 0.62rem 0.72rem;
  margin: 0 0 0.42rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,245,241,0.96));
  border: 1px solid rgba(53,31,26,0.1);
  box-shadow: 0 8px 18px rgba(36, 15, 12, 0.08);
}

.ranking-leaderboard-row.is-top {
  border-color: rgba(210, 161, 44, 0.5);
  background: linear-gradient(90deg, rgba(236,187,44,0.94), rgba(255,237,177,0.98));
  box-shadow: 0 16px 30px rgba(214, 165, 61, 0.2);
}

.ranking-leaderboard-row.is-second {
  background: linear-gradient(90deg, rgba(225,225,225,0.95), rgba(246,246,246,0.98));
}

.ranking-leaderboard-row.is-third {
  background: linear-gradient(90deg, rgba(231,184,144,0.96), rgba(246,226,207,0.98));
}

.ranking-leaderboard-row.is-me {
  border-color: rgba(255, 196, 76, 0.42);
  box-shadow: 0 0 0 2px rgba(255, 221, 114, 0.42), 0 16px 30px rgba(214, 165, 61, 0.16);
}

.ranking-leaderboard-rank {
  min-width: 40px;
  display: grid;
  place-items: center;
  font-size: 1.08rem;
  font-weight: 900;
  color: #171414;
}

.ranking-leaderboard-player {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
}

.ranking-leaderboard-player-copy {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.ranking-leaderboard-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(240,231,226,0.98));
  border: 2px solid rgba(255,255,255,0.82);
  color: #6a463f;
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.ranking-leaderboard-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ranking-leaderboard-avatar-label {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.ranking-leaderboard-player strong {
  font-size: 0.78rem;
  color: #171414;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-leaderboard-badges {
  display: flex;
  gap: 0.18rem;
  min-height: 16px;
}

.ranking-leaderboard-badge {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.58);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.ranking-leaderboard-badge--placeholder {
  background: rgba(255,255,255,0.42);
  border: 1px dashed rgba(108, 78, 71, 0.22);
}

.ranking-leaderboard-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(104, 73, 67, 0.34);
}

.ranking-leaderboard-patent,
.ranking-leaderboard-combo,
.ranking-leaderboard-precision,
.ranking-leaderboard-score {
  font-size: 0.72rem;
  font-weight: 900;
  min-width: 0;
}

.ranking-leaderboard-patent {
  color: #1d7c45;
  line-height: 1.05;
  font-size: 0.64rem;
  overflow-wrap: anywhere;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ranking-leaderboard-patent-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 auto;
}

.ranking-leaderboard-combo {
  color: #171414;
  text-align: center;
  font-size: 0.78rem;
  white-space: nowrap;
}

.ranking-leaderboard-precision {
  color: #1c7f50;
  text-align: center;
  white-space: nowrap;
  font-size: 0.68rem;
}

.ranking-leaderboard-score {
  color: #171414;
  text-align: center;
  white-space: nowrap;
  font-size: 0.7rem;
}

.ranking-leaderboard-row--precision,
.ranking-leaderboard-row--combo {
  grid-template-columns: 0.7fr 1.8fr 1.25fr 2.2fr 1.4fr;
  align-items: stretch;
}

.ranking-leaderboard-spotlight {
  min-width: 0;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  padding: 0.62rem 0.72rem;
  border-radius: 18px;
  border: 1px solid rgba(80, 41, 31, 0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.ranking-leaderboard-spotlight--precision {
  background: linear-gradient(135deg, rgba(255, 247, 214, 0.96), rgba(255, 234, 173, 0.92));
}

.ranking-leaderboard-spotlight--combo {
  background: linear-gradient(135deg, rgba(255, 234, 228, 0.96), rgba(255, 203, 177, 0.92));
}

.ranking-leaderboard-spotlight-emblem {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.78), rgba(255,255,255,0.1) 38%),
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,248,244,0.46));
  border: 1px dashed rgba(114, 78, 66, 0.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.ranking-leaderboard-spotlight-copy {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.ranking-leaderboard-spotlight-kicker {
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(45, 22, 18, 0.7);
}

.ranking-leaderboard-spotlight strong {
  color: #171414;
  font-size: 1.15rem;
  line-height: 1;
}

.ranking-leaderboard-spotlight small {
  color: #5e433b;
  font-size: 0.7rem;
  line-height: 1.2;
}

.ranking-leaderboard-meta-grid {
  display: grid;
  gap: 0.45rem;
  align-content: center;
}

.ranking-leaderboard-meta-chip {
  display: grid;
  gap: 0.1rem;
  padding: 0.5rem 0.58rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.66);
  border: 1px solid rgba(65, 35, 28, 0.08);
}

.ranking-leaderboard-meta-chip span {
  color: #7b5f55;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ranking-leaderboard-meta-chip strong {
  color: #171414;
  font-size: 0.92rem;
  line-height: 1;
}

@media (max-width: 720px) {
  .ranking-summary-grid,
  .ranking-leaderboard-head,
  .ranking-leaderboard-row {
    grid-template-columns: 1fr;
  }

  .ranking-leaderboard-head {
    display: none;
  }

  .ranking-summary-card {
    border-right: 0;
    border-bottom: 1px solid rgba(78, 48, 40, 0.14);
  }

  .ranking-summary-card:last-child {
    border-bottom: 0;
  }

  .ranking-leaderboard-patent,
  .ranking-leaderboard-combo,
  .ranking-leaderboard-precision,
  .ranking-leaderboard-score {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .ranking-screen-root {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ranking-screen {
    min-height: auto;
    height: auto;
    grid-template-rows: auto auto auto auto;
    gap: 0.72rem;
    padding: calc(0.9rem + env(safe-area-inset-top, 0px)) 0 calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .ranking-screen-header {
    padding: 0 0.72rem;
  }

  .ranking-screen-back {
    position: static;
    justify-self: start;
    margin-bottom: 0.4rem;
    min-height: 38px;
    padding: 0 0.9rem;
    border-radius: 13px;
  }

  .ranking-screen-heading {
    gap: 0.08rem;
  }

  .ranking-screen-heading h3 {
    font-size: clamp(1.08rem, 7vw, 1.7rem);
    line-height: 1.04;
  }

  .ranking-screen-heading p {
    font-size: 0.82rem;
  }

  .ranking-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0.72rem;
    border-radius: 18px;
  }

  .ranking-tabs {
    margin: 0 0.72rem;
    gap: 0.35rem;
  }

  .ranking-tab {
    min-height: 36px;
    padding: 0 0.82rem;
    font-size: 0.8rem;
  }

  .ranking-summary-card {
    min-height: 74px;
    padding: 0.72rem 0.45rem;
  }

  .ranking-summary-title {
    font-size: 0.58rem;
    line-height: 1.05;
  }

  .ranking-summary-value {
    margin-top: 0.24rem;
    font-size: clamp(0.96rem, 4.2vw, 1.28rem);
    line-height: 1.02;
    overflow-wrap: anywhere;
  }

  .ranking-summary-sub {
    margin-top: 0.12rem;
    font-size: 0.68rem;
  }

  .ranking-leaderboard {
    min-height: auto;
    overflow: visible;
    padding: 0 0 0.2rem;
  }

  .ranking-leaderboard-shell {
    padding: 0.44rem 0.72rem 0.72rem;
    border-radius: 24px 24px 0 0;
  }

  .ranking-leaderboard-handle {
    margin-bottom: 0.7rem;
  }

  .ranking-leaderboard-row {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "rank player score"
      "rank patent score"
      "combo precision precision";
    gap: 0.3rem;
    padding: 0.52rem 0.58rem;
    margin-bottom: 0.32rem;
    border-radius: 16px;
  }

  .ranking-leaderboard-rank {
    grid-area: rank;
    min-width: 0;
    font-size: 0.96rem;
  }

  .ranking-leaderboard-player {
    grid-area: player;
    grid-template-columns: 30px 1fr;
    gap: 0.4rem;
  }

  .ranking-leaderboard-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.72rem;
  }

  .ranking-leaderboard-player strong {
    font-size: 0.74rem;
  }

  .ranking-leaderboard-badge {
    width: 16px;
    height: 16px;
  }

  .ranking-leaderboard-patent {
    grid-area: patent;
    font-size: 0.62rem;
    text-align: left;
  }

  .ranking-leaderboard-patent-icon {
    width: 16px;
    height: 16px;
  }

  .ranking-leaderboard-combo {
    grid-area: combo;
    text-align: left;
  }

  .ranking-leaderboard-precision {
    grid-area: precision;
    text-align: right;
  }

  .ranking-leaderboard-score {
    grid-area: score;
    align-self: stretch;
    display: grid;
    align-content: center;
    text-align: right;
  }

  .ranking-leaderboard-combo,
  .ranking-leaderboard-precision,
  .ranking-leaderboard-score {
    font-size: 0.68rem;
  }

  .ranking-leaderboard-mode-intro {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 0.6rem;
    margin-bottom: 0.62rem;
    padding-bottom: 0.35rem;
  }

  .ranking-leaderboard-mode-icon-slot {
    width: 44px;
    height: 44px;
  }

  .ranking-leaderboard-mode-intro strong {
    font-size: 0.84rem;
  }

  .ranking-leaderboard-mode-intro span {
    font-size: 0.68rem;
  }

  .ranking-leaderboard-row--precision,
  .ranking-leaderboard-row--combo {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "rank player"
      "rank patent"
      "spotlight spotlight"
      "meta meta";
    gap: 0.36rem;
  }

  .ranking-leaderboard-row--precision .ranking-leaderboard-rank,
  .ranking-leaderboard-row--combo .ranking-leaderboard-rank {
    grid-area: rank;
  }

  .ranking-leaderboard-row--precision .ranking-leaderboard-player,
  .ranking-leaderboard-row--combo .ranking-leaderboard-player {
    grid-area: player;
  }

  .ranking-leaderboard-row--precision .ranking-leaderboard-patent,
  .ranking-leaderboard-row--combo .ranking-leaderboard-patent {
    grid-area: patent;
  }

  .ranking-leaderboard-row--precision .ranking-leaderboard-spotlight,
  .ranking-leaderboard-row--combo .ranking-leaderboard-spotlight {
    grid-area: spotlight;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 0.55rem;
    padding: 0.54rem 0.58rem;
    border-radius: 16px;
  }

  .ranking-leaderboard-spotlight-emblem {
    width: 48px;
    height: 48px;
  }

  .ranking-leaderboard-spotlight strong {
    font-size: 1rem;
  }

  .ranking-leaderboard-spotlight small {
    font-size: 0.64rem;
  }

  .ranking-leaderboard-row--precision .ranking-leaderboard-meta-grid,
  .ranking-leaderboard-row--combo .ranking-leaderboard-meta-grid {
    grid-area: meta;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-leaderboard-meta-chip {
    padding: 0.44rem 0.5rem;
    border-radius: 12px;
  }

  .ranking-leaderboard-meta-chip strong {
    font-size: 0.84rem;
  }
}

.ghost-metronome-precision-label.is-left {
  left: 16px;
}

.ghost-metronome-precision-label.is-center {
  left: 50%;
  transform: translate(-50%, -50%);
}

.ghost-metronome-precision-label.is-right {
  right: 16px;
}

.ghost-metronome-precision-dot {
  position: absolute;
  top: 50%;
  min-width: 56px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  z-index: 2;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.72);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.dot_perfect_green { background: #2fb357; }
.dot_rushed_red { background: #ff4c42; }
.dot_delayed_yellow { background: #f2c94c; }

.ghost-metronome-pad {
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(255,244,241,0.97));
  min-height: 96px;
  width: 100%;
  display: grid;
  place-items: center;
  gap: 0.2rem;
  text-align: center;
  color: #251c1a;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(61, 23, 17, 0.08);
}

.ghost-metronome-pad strong {
  font-size: 0.92rem;
}

.ghost-metronome-pad span {
  font-size: 0.74rem;
  color: #6f5954;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] {
  --cyan: #1ecbff;
  --cyan-glow: rgba(30, 203, 255, 0.35);
  --cyan-soft: rgba(30, 203, 255, 0.14);
  --green-zone: rgba(84, 220, 132, 0.28);
  --green-zone-border: rgba(84, 220, 132, 0.72);
  --red-zone: #ff6b6b;
  --yellow-zone: #ffd95a;
  --panel: rgba(7, 30, 42, 0.96);
  --panel-border: rgba(92, 212, 255, 0.22);
  --text-main: #effcff;
  --text-soft: rgba(221, 243, 248, 0.88);
  --line-left: rgba(255, 217, 90, 0.42);
  --line-center: rgba(96, 241, 255, 0.48);
  --line-right: rgba(255, 116, 116, 0.4);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .timeline-area {
  width: 100%;
  padding: 0.2rem 0 0.1rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .timeline-container {
  position: relative;
  width: 100%;
  min-height: 90px;
  border-radius: 28px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, rgba(6, 29, 41, 0.98), rgba(8, 43, 60, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 14px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .timeline-line {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--line-left) 0%, var(--line-center) 50%, var(--line-right) 100%);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .early-glow,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .late-glow {
  position: absolute;
  top: 50%;
  width: 18%;
  height: 26px;
  transform: translateY(-50%);
  border-radius: 999px;
  pointer-events: none;
  filter: blur(14px);
  opacity: 0.44;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .early-glow {
  left: 5%;
  background: radial-gradient(circle, rgba(255, 217, 90, 0.3) 0%, transparent 72%);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .late-glow {
  right: 5%;
  background: radial-gradient(circle, rgba(255, 107, 107, 0.3) 0%, transparent 72%);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .indicator-early,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .indicator-late {
  position: absolute;
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translateY(-50%);
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  font-weight: 900;
  background: linear-gradient(180deg, rgba(8, 39, 55, 0.95), rgba(5, 24, 35, 0.95));
  border: 1px solid var(--panel-border);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  z-index: 2;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .indicator-early {
  left: 14px;
  color: var(--yellow-zone);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .indicator-late {
  right: 14px;
  color: #ff7a7a;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .perfect-zone {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(148px, 16vw, 212px);
  height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: var(--green-zone);
  border: 1px solid var(--green-zone-border);
  display: grid;
  place-items: center;
  box-shadow: 0 0 24px rgba(84, 220, 132, 0.18);
  z-index: 2;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .perfect-label {
  color: #effff2;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .cursor-line {
  position: absolute;
  top: 7px;
  bottom: 7px;
  width: 14px;
  left: 0;
  border-radius: 999px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(255, 116, 116, 0.98), rgba(224, 57, 57, 0.98));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.84), 0 0 18px rgba(255, 95, 95, 0.42);
  z-index: 3;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .indicator-early.is-flashing,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .indicator-late.is-flashing,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .perfect-zone.is-flashing {
  animation: ghostEx2Flash 280ms ease 2;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.7rem;
  align-items: end;
  margin-top: auto;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row > button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.28rem;
  color: var(--text-main);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row > button svg {
  width: 14px;
  height: 14px;
  color: white;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row > button strong {
  font-size: 0.72rem;
  line-height: 1;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row > button span {
  font-size: 0.54rem;
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #9ceeff;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row > button::before {
  content: "";
  width: 46px;
  height: 46px;
  border-radius: 16px;
  grid-row: 1 / span 2;
  grid-column: 1;
  background: linear-gradient(180deg, #1ecbff 0%, #11b5ef 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14), 0 0 18px var(--cyan-glow);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row > button > svg,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row > button > strong {
  grid-column: 1;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row > button > svg {
  margin-top: -38px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row > button > strong {
  margin-top: -12px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] #touchPad {
  width: 100%;
  min-height: 96px;
  border-radius: 28px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, rgba(7, 30, 42, 0.98), rgba(8, 39, 56, 0.98));
  display: grid;
  place-items: center;
  gap: 0.14rem;
  color: var(--text-main);
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] #touchPad strong {
  font-size: 0.96rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] #touchPad span {
  font-size: 0.68rem;
  color: var(--text-soft);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-header {
  align-items: start;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-heading {
  gap: 0.16rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-heading p {
  max-width: 56rem;
  font-size: 0.78rem;
  line-height: 1.2;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .exercise2-inline-hud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .exercise2-inline-chip {
  min-height: 34px;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: rgba(7, 30, 42, 0.82);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .exercise2-inline-chip span {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #89e8ff;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .exercise2-inline-chip strong,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .exercise2-inline-chip--timer {
  font-size: 0.72rem;
  line-height: 1;
  color: var(--text-main);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .exercise2-inline-chip--action {
  cursor: pointer;
  font-weight: 800;
  font-size: 0.72rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-topbar {
  display: none;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-topblock {
  min-height: 10px;
  background: rgba(8, 48, 66, 0.8);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-topblock strong {
  font-size: 0.44rem;
  color: rgba(214, 246, 255, 0.62);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .timeline-area {
  align-self: center;
  padding: 0;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-header {
  gap: 0.35rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-heading {
  gap: 0.12rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-heading h3 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-heading p {
  max-width: 52rem;
  font-size: 0.66rem;
  line-height: 1.16;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .timeline-container {
  min-height: 68px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .indicator-early,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .indicator-late {
  width: 40px;
  height: 40px;
  font-size: 1.18rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .perfect-zone {
  height: 34px;
  width: clamp(120px, 14vw, 168px);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .perfect-label {
  font-size: 0.72rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .cursor-line {
  top: 9px;
  bottom: 9px;
  width: 10px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row {
  gap: 0.4rem;
  align-self: end;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row > button {
  gap: 0.22rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row > button::before {
  display: none;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row .beat-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(128, 239, 255, 0.72);
  background: rgba(10, 59, 79, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 0 12px rgba(30, 203, 255, 0.14);
  display: grid;
  place-items: center;
  justify-items: center;
  align-content: center;
  gap: 0.05rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row .beat-circle svg {
  width: 10px;
  height: 10px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row .beat-circle strong {
  font-size: 0.54rem;
  line-height: 1;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row > button > svg,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row > button > strong {
  margin: 0;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row > button span {
  font-size: 0.44rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-footer {
  gap: 0.2rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-footer-top {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.3rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-status {
  min-height: 26px;
  padding: 0.2rem 0.55rem;
  border-radius: 16px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-status strong {
  font-size: 0.56rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-status span {
  font-size: 0.48rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-start-btn {
  min-width: 82px;
  height: 28px;
  padding-inline: 0.52rem;
  border-radius: 12px;
  font-size: 0.68rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] #touchPad {
  min-height: 42px;
  max-height: 42px;
  padding: 0.2rem 0.4rem;
  border-radius: 16px;
  gap: 0.04rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] #touchPad strong {
  font-size: 0.62rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] #touchPad span {
  font-size: 0.46rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .exercise2-inline-hud {
  gap: 0.3rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .exercise2-inline-chip {
  min-height: 24px;
  padding: 0.2rem 0.48rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .exercise2-inline-chip span {
  font-size: 0.46rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .exercise2-inline-chip strong,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .exercise2-inline-chip--timer,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .exercise2-inline-chip--action {
  font-size: 0.58rem;
}

.ghost-metronome-screen.is-exercise-2-premium {
  width: 100vw;
  min-height: 100dvh;
  grid-template-rows: auto auto auto auto 1fr auto;
  gap: 0.9rem;
  padding: calc(0.8rem + env(safe-area-inset-top, 0px)) 1.5rem calc(0.8rem + env(safe-area-inset-bottom, 0px));
  color: #dffcff;
}

.ghost-metronome-screen-root[data-ghost-exercise="exercise-2"] {
  background:
    radial-gradient(circle at 50% 0%, rgba(130, 252, 255, 0.16), transparent 28%),
    radial-gradient(circle at 12% 24%, rgba(0, 225, 255, 0.12), transparent 22%),
    radial-gradient(circle at 88% 18%, rgba(0, 148, 255, 0.12), transparent 22%),
    linear-gradient(180deg, #02131d 0%, #06273a 42%, #083a54 100%);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-header {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-heading {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-heading label {
  font-size: 0.88rem;
  letter-spacing: 0.14em;
  color: #7ff7ff;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-heading h3 {
  font-size: clamp(1.55rem, 2.8vw, 2.35rem);
  color: #effdff;
  text-shadow: 0 0 24px rgba(0, 226, 255, 0.14);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-header p {
  max-width: 72ch;
  color: rgba(214, 243, 248, 0.88);
  font-size: 0.95rem;
  line-height: 1.38;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-back,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-calibrate-btn,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-start-btn {
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(127, 247, 255, 0.28);
  background: linear-gradient(180deg, rgba(244, 252, 255, 0.98), rgba(221, 244, 250, 0.92));
  color: #0b2432;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.46);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-combo-hud strong,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-combo-hud span,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-status strong,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-status span,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-pad strong,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-pad span,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-challenge-timer {
  color: #f3fbff;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-combo-hud strong {
  font-size: clamp(1.85rem, 3vw, 2.7rem);
  text-shadow: 0 0 18px rgba(0, 226, 255, 0.12);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-combo-hud span {
  font-size: 1rem;
  color: rgba(221, 248, 255, 0.82);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-challenge-btn {
  border-color: rgba(127, 247, 255, 0.22);
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.98), rgba(230, 247, 250, 0.94));
  color: #08212d;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255,255,255,0.18);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-challenge-timer,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-status,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-pad,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-ex2-indicator {
  background: linear-gradient(180deg, rgba(9, 40, 58, 0.92), rgba(7, 31, 45, 0.92));
  border-color: rgba(95, 235, 255, 0.22);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-topbar {
  gap: 0.5rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-topblock {
  min-height: 22px;
  border-color: rgba(122, 241, 255, 0.18);
  background: rgba(3, 24, 34, 0.42);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-topblock strong {
  color: rgba(222, 250, 255, 0.72);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-center {
  align-content: end;
  gap: 0.35rem;
  min-height: 0;
  margin-top: auto;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-row {
  max-width: none;
  gap: 0.55rem;
  align-items: end;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] #ghost-metronome-row-ghost {
  display: none;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] #ghost-metronome-row-audible {
  grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  align-items: end;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-circle-card {
  min-height: auto;
  gap: 0.25rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-circle-card > span {
  font-size: 0.54rem;
  color: #9ceeff;
  max-width: none;
  letter-spacing: 0.03em;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-circle {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  gap: 0.12rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-circle strong {
  font-size: 0.72rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-glyph {
  width: 14px;
  height: 14px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-circle-card.is-audible .ghost-metronome-circle {
  background: linear-gradient(180deg, #00d8ff 0%, #00b7ff 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18), 0 0 18px rgba(0, 225, 255, 0.2);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-circle-card.is-ghost .ghost-metronome-circle {
  background: linear-gradient(180deg, rgba(14, 84, 109, 0.96), rgba(11, 63, 82, 0.96));
  box-shadow: inset 0 0 0 1px rgba(127, 247, 255, 0.16);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-circle-card.is-active .ghost-metronome-circle {
  transform: scale(1.08);
  box-shadow: 0 0 0 4px rgba(0, 234, 255, 0.22), 0 0 24px rgba(0, 225, 255, 0.28);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-footer {
  background: transparent;
  padding-bottom: 0;
  gap: 0.45rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-footer-top {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-precision-track {
  min-height: 52px;
  background: linear-gradient(180deg, rgba(6, 33, 46, 0.98), rgba(8, 52, 70, 0.98));
  border-color: rgba(95, 235, 255, 0.32);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 12px 24px rgba(0, 0, 0, 0.16);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-precision-track::before {
  inset: 50% 18px auto 18px;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 216, 88, 0.32), rgba(111, 245, 255, 0.42), rgba(255, 104, 104, 0.34));
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-perfect-band {
  width: clamp(130px, 16vw, 190px);
  background: rgba(106, 255, 170, 0.26);
  border: 1px solid rgba(98, 255, 166, 0.45);
  box-shadow: 0 0 16px rgba(95, 255, 163, 0.14);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-precision-cursor {
  width: 14px;
  top: 6px;
  bottom: 6px;
  background: linear-gradient(180deg, rgba(255, 90, 90, 0.98), rgba(221, 48, 48, 0.98));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.82), 0 0 16px rgba(255, 84, 84, 0.42);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-ex2-timeline-shell {
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 0.7rem;
  width: 100%;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-ex2-indicator {
  height: 52px;
  border-radius: 16px;
  font-size: 1.45rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-ex2-perfect-zone strong {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-pad {
  min-height: 72px;
  border-radius: 20px;
  gap: 0.1rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-pad strong {
  font-size: 0.8rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-pad span {
  font-size: 0.65rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-status {
  min-height: 42px;
  padding: 0.45rem 0.8rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-status strong {
  font-size: 0.74rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-status span {
  font-size: 0.64rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-start-btn {
  min-width: 118px;
  height: 42px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-combo-hud {
  min-height: 0;
  gap: 0.1rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-combo-hud strong {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-combo-hud span {
  font-size: 0.82rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-challenge-hud {
  gap: 0.35rem;
  margin-top: 0.1rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-challenge-btn {
  width: 78px;
  height: 78px;
  font-size: 0.84rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-challenge-timer {
  min-width: 120px;
  padding: 0.38rem 0.7rem;
  font-size: 0.72rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-timeline-headings {
  margin-top: 0.15rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-timeline-title {
  font-size: 0.66rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-topbar {
  gap: 0.35rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-topblock {
  min-height: 14px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-topblock strong {
  font-size: 0.5rem;
}

.ghost-metronome-calibration {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(24, 17, 15, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.ghost-metronome-calibration.hidden {
  display: none;
}

.ghost-metronome-calibration-card {
  width: min(540px, calc(100vw - 2rem));
  min-height: 380px;
  border-radius: 28px;
  background: rgba(255, 250, 248, 0.98);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.24);
  padding: 1rem 1.2rem;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.8rem;
  position: relative;
  text-align: center;
}

.ghost-metronome-calibration-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  height: 34px;
  padding: 0 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(31, 31, 31, 0.1);
  background: #fff;
  color: #251c1a;
  font-weight: 700;
}

.ghost-metronome-calibration-circle {
  width: min(220px, 52vw);
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(55, 187, 102, 0.22), rgba(55, 187, 102, 0.08));
  display: grid;
  place-items: center;
  color: #2aa756;
  box-shadow: inset 0 0 0 2px rgba(55, 187, 102, 0.16);
}

.ghost-metronome-calibration-icon {
  width: 92px;
  height: 92px;
  display: block;
}

.ghost-metronome-calibration-card strong {
  font-size: 1.25rem;
  color: #251c1a;
}

.ghost-metronome-calibration-card p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
  color: #251c1a;
}

.ghost-metronome-calibration-card span {
  color: #666;
  font-size: 0.82rem;
  line-height: 1.35;
  max-width: 44ch;
}

.ghost-metronome-result-modal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 12, 11, 0.56);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 25;
}

.ghost-metronome-result-modal.hidden {
  display: none;
}

.ghost-metronome-result-card {
  width: min(520px, calc(100vw - 40px));
  display: grid;
  gap: 0.8rem;
  justify-items: center;
  text-align: center;
  padding: 28px 24px;
  border-radius: 24px;
  background: rgba(255, 250, 248, 0.98);
  box-shadow: 0 24px 48px rgba(0,0,0,0.22);
  border: 1px solid rgba(76, 37, 31, 0.12);
}

.ghost-metronome-result-card strong {
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  color: #251c1a;
}

.ghost-metronome-result-card p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #ff523d;
}

.ghost-metronome-result-card span {
  color: #6f5954;
  font-size: 0.94rem;
}

.ghost-metronome-result-btn {
  min-width: 160px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(31,31,31,0.08);
  background: rgba(255,255,255,0.96);
  color: #251c1a;
  font-weight: 800;
}

@media (max-width: 900px) {
  .ghost-metronome-screen {
    grid-template-rows: auto auto auto 1fr auto;
    padding-inline: 0.75rem;
  }

  .ghost-metronome-row {
    gap: 18px;
  }

  .ghost-metronome-footer-top {
    grid-template-columns: 1fr;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-2"] {
    width: 100vw;
    min-height: 100dvh;
    padding-inline: 1rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-footer-top {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-row {
    gap: 0.65rem;
  }
}

@media (max-width: 640px) {
  .ghost-metronome-screen {
    gap: 0.45rem;
  }

  .ghost-metronome-topbar,
  .ghost-metronome-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .ghost-metronome-header {
    grid-template-columns: 1fr;
  }

  .ghost-metronome-back {
    justify-self: start;
  }

  .ghost-metronome-calibrate-btn--top {
    justify-self: start;
  }

  .ghost-metronome-circle {
    width: 88px;
    height: 88px;
  }

  .ghost-metronome-circle-card {
    min-height: 146px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-header {
    grid-template-columns: 1fr;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-back,
  .ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-calibrate-btn--top {
    justify-self: start;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-ex2-timeline-shell {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 0.5rem;
  }
}

.cadence-preview-block[data-value="2"] {
  background: var(--face-2-color, #ffd000);
}

.cadence-preview-block[data-value="3"] {
  background: var(--face-3-color, #70b8fe);
}

.cadence-preview-block[data-value="4"] {
  background: var(--face-4-color, #7fe2c0);
}

.cadence-preview-block[data-value="5"] {
  background: var(--face-5-color, #d79bff);
}

.cadence-preview-block[data-value="6"] {
  background: var(--face-6-color, #ffb36b);
}

.cadence-preview-block.is-hold {
  width: 38px;
  flex-basis: 38px;
}

.cadence-preview-block.is-split {
  width: 14px;
  flex-basis: 14px;
}

.cadence-preview-block i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #1f1f1f;
}

.cadence-preview-block i.is-silent {
  background: transparent;
  border: 1px solid rgba(31, 31, 31, 0.5);
}

.cadence-preview-more {
  color: #666;
  font-weight: 900;
  line-height: 1;
}

.online-library-folder {
  display: block;
  width: 100%;
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(36, 15, 12, 0.08);
  box-sizing: border-box;
  flex: 0 0 auto;
}

.online-library-folder[open] {
  border-color: rgba(255, 82, 61, 0.14);
}

.online-library-folder-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  min-height: 72px;
  box-sizing: border-box;
}

.online-library-folder-summary::-webkit-details-marker {
  display: none;
}

.online-library-folder-main {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.online-library-folder-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ff6b54 0%, #ff523d 100%);
  color: #fff;
  box-shadow: 0 12px 22px rgba(255, 82, 61, 0.22);
  flex: 0 0 42px;
}

.online-library-folder-copy {
  min-width: 0;
  display: grid;
  gap: 0.16rem;
}

.online-library-folder-copy strong {
  font-size: 0.98rem;
  line-height: 1.1;
}

.online-library-folder-copy span {
  color: #7a605a;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.online-library-folder-chevron {
  color: #8c6f69;
  transition: transform 0.2s ease;
}

.online-library-folder[open] .online-library-folder-chevron {
  transform: rotate(90deg);
}

.online-library-folder-body {
  border-top: 1px solid rgba(31, 31, 31, 0.06);
  padding: 0.2rem 0.75rem 0.75rem;
  display: block;
}

.online-library-folder-body > * + * {
  margin-top: 0.55rem;
}

.online-library-folder-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.25rem;
  padding-bottom: 0.35rem;
  gap: 0.5rem;
}

.online-library-folder-add {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 12px;
  background: linear-gradient(180deg, #ff6b54 0%, #ff523d 100%);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 22px rgba(255, 82, 61, 0.22);
}

.online-library-folder-delete {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(179, 38, 30, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 241, 239, 0.98));
  color: #b3261e;
  font-size: 1rem;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(179, 38, 30, 0.08);
}

.online-library-folder-empty {
  padding: 0.55rem 0.15rem 0.1rem;
  color: #7b625c;
  font-size: 0.8rem;
  font-weight: 700;
}

.online-library-item {
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 248, 246, 0.98));
  padding: 0.8rem 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  text-align: left;
  color: #251c1a;
  cursor: pointer;
  width: 100%;
  min-height: 60px;
  box-sizing: border-box;
  margin-top: 0.55rem;
  flex: 0 0 auto;
}

.online-library-item:active {
  transform: scale(0.992);
}

.online-library-item-copy {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.online-library-item-instrument {
  font-weight: 900;
  font-size: 0.96rem;
  line-height: 1.12;
}

.online-library-item-title {
  color: #ff523d;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.online-library-item-meta,
.online-library-item-desc {
  color: #7b625c;
  font-size: 0.74rem;
  line-height: 1.3;
}

.online-library-item-trail {
  color: #8b6c65;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.online-library-item-arrow {
  width: 0.75rem;
  height: 0.75rem;
  display: block;
}

.online-library-item-trail .online-cadence-preview {
  justify-content: flex-end;
  min-height: 38px;
  max-width: 112px;
}

.cadence-admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.cadence-admin-panel .form-group {
  padding: 0;
}

.guide-card-visual {
  width: min(100%, 320px);
  margin: 0 auto;
}

@media (max-width: 520px) {
  .auth-actions,
  .cadence-admin-grid {
    grid-template-columns: 1fr;
  }
}

/* Removed hover for mobile app (already has :active) */
/* .bb-button:hover {
  transform: scale(1.1);
  box-shadow: 0 clamp(3px, 0.6vw, 5.4px) clamp(5px, 1vw, 9px) rgba(0, 0, 0, 0.3);
} */

.bb-button:active {
  transform: scale(0.95);
  box-shadow: 0 clamp(1px, 0.2vw, 1.8px) clamp(2px, 0.5vw, 4.5px)
    rgba(0, 0, 0, 0.25);
}

/* ============================================
   UI COMPONENTS
   ============================================ */
.dice-ui {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: center;
 
  position: relative;
}

#bpm-ui {
  width: clamp(60px, 8vw, 80px);
  height: clamp(2rem, 3vw, 2.7rem);
  border: 1px solid #ccc;
  border-radius: clamp(0.3rem, 0.5vw, 0.45rem);
  text-align: center;
  font-size: clamp(12px, 1.5vw, 16px);
}

.title-row {
  display: flex;
  width: 100%;
  max-width: calc(
    var(--dice-size, 80px) * var(--grid-rows) +
      (var(--dice-size, 80px) * 0.06 * var(--grid-rows) * 2)
  );
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  margin-left: auto;
  margin-right: auto;
}

.row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.quarter-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: start;
  width: 90%;
  height: 100%;
}

.quarter-wrapper p {
  position: relative;
}

.quarter-wrapper svg {
  height: auto;
  width: 0.6rem;
  margin: 0.6rem;
}

.row,
.quarter-wrapper,
svg {
  margin: 0;
  padding: 0;
}

#quarter-p {
  font-weight: 600;
  opacity: 0.9;
  margin: none;
  font-size: 1.3rem;
}

/* ============================================
   COUNTDOWN
   ============================================ */
#countdown {
  margin-left: 1rem;
  width: fit-content;
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0;
}

#countdown .dot {
  height: 0.8rem;
  width: 0.8rem;
  border-radius: 50%;
  background-color: rgba(169, 169, 169, 0.5);
}

#restDotInputs {
  height: fit-content;
  padding-top: 1rem;
  padding-bottom: 1rem;
  align-items: center;
  width: 200px;
  gap: 1rem;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  position: relative;
  display: flex;
  overflow: hidden;
  align-items: stretch;
  justify-content: flex-end;
  width: 0;
  height: 100%;
  background: transparent;
  max-width: 620px;
  z-index: 100;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.open-side {
  width: min(560px, 36vw);
}

#sidebar-wrapper {
  display: flex;
  transition: opacity 0.15s ease;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
  height: 10%;
  padding: 0;
  gap: 0;
  opacity: 1;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-left: none;
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar:not(.open-side) #sidebar-wrapper {
  opacity: 0;
}

#sidebar-wrapper .sidebar-header {
  padding: 1.25rem 1.5rem;
  position: relative;
  justify-content: center;
  align-items: center;
}

#sidebar-wrapper .sidebar-content {
  padding: 1.4rem 1.5rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

#sidebar-wrapper .sidebar-main-stack {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.9rem;
}

#sidebar-wrapper .sidebar-section-title {
  margin-top: 0.15rem;
  margin-bottom: 0;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

#sidebar-wrapper #sidebar-block-title {
  margin: 0 auto;
  width: 100%;
  text-align: center;
  padding: 0 2.2rem;
}

#sidebar-wrapper .form-group {
  margin-bottom: 0;
  gap: 0.6rem;
  align-items: center;
  text-align: center;
}

#sidebar-wrapper .form-group > label {
  color: #555;
  font-weight: 600;
  font-size: 0.9rem;
}

#sidebar-wrapper .sidebar-combobox {
  width: 100%;
  max-width: 360px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #f3f3f4;
  text-align: center;
  text-align-last: center;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  line-height: 1.2;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#sidebar-wrapper .sidebar-combobox option {
  text-align: center;
}

#sidebar-wrapper .sidebar-combobox:active {
  border-color: transparent;
  background: #eeeeef;
}

#sidebar-wrapper .sidebar-combobox:focus {
  outline: none;
  border-color: transparent;
  background: #ececed;
  box-shadow: 0 0 0 2px rgba(248, 92, 72, 0.14);
}

#sidebar-wrapper .dice-preview {
  min-height: calc(var(--dice-size, 80px) * 1.35);
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7f7f8 0%, #f2f2f3 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#sidebar-wrapper .dice-preview .item {
  margin: 0;
  pointer-events: none;
}

#sidebar-wrapper .rest-modal {
  width: 100%;
  max-width: 360px;
  border: none;
  border-radius: 12px;
  background: transparent;
  padding: 0;
  margin: 0 auto;
}

#sidebar-wrapper #restDotInputs {
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0.75rem 0;
}

#sidebar-wrapper .note-settings-drawer {
  margin-top: 0;
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: #f2f2f4;
  position: sticky;
  bottom: 0;
  z-index: 2;
}

#sidebar-wrapper .note-settings-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  color: #333;
}

#sidebar-wrapper .note-settings-summary::-webkit-details-marker {
  display: none;
}

#sidebar-wrapper .note-settings-summary svg.fa-solid {
  transition: transform 0.2s ease;
}

#sidebar-wrapper
  .note-settings-drawer[open]
  .note-settings-summary
  svg.fa-solid {
  transform: rotate(180deg);
}

#sidebar-wrapper .note-settings-body {
  padding: 0.15rem 0.5rem 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#sidebar-wrapper .checkpoint {
  border: none;
  border-radius: 12px;
  background: transparent;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.4rem;
  transition: background-color 0.2s ease, box-shadow 0.2s ease,
    transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  text-align: center;
}

#sidebar-wrapper .checkpoint:active {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

#sidebar-wrapper .checkpoint:focus-within {
  box-shadow: 0 0 0 3px rgba(248, 92, 72, 0.12);
}

#sidebar-wrapper .checkpoint-bpm {
  flex-direction: column;
  align-items: center;
}

#sidebar-wrapper .checkpoint-bpm > div {
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
}

#sidebar-wrapper .form-check-input {
  margin: 0;
  flex: 0 0 auto;
}

#sidebar-wrapper .form-check-label {
  color: #555;
  font-weight: 600;
  line-height: 1.15;
}

#sidebar-wrapper .dot-checkbox {
  width: 2rem;
  height: 2rem;
  border: 2px solid darkgray;
  background-color: transparent;
}

#sidebar-wrapper .dot-checkbox:checked {
  background-color: #fb6354;
  border-color: #c74e42;
}

#sidebar-wrapper #bpmInput {
  width: 100%;
  margin-left: 0;
  margin-top: 0.45rem;
}

#sidebar-wrapper .checkpoint-bpm .bpm-chips {
  width: 100%;
  justify-content: center;
  gap: 0.45rem;
}

#sidebar-wrapper .checkpoint-bpm .bpm-chip {
  flex: 0 0 auto;
  min-width: 62px;
}

#close-side-button {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin-left: 0;
}
#delete-side-button {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin-left: 0;
}

/* ============================================
   CAT AND JUDGEMENT
   ============================================ */
.cat {
  position: relative;
  display: flex;

  margin-top: clamp(12px, 2vw, 21.6px);
  align-items: center;
  justify-content: flex-end;
  z-index: 1000;
}

.cat img {
  position: relative;
  width: clamp(80px, 15vw, 144px);
  height: auto;
  transform-origin: center bottom;
  user-select: none;
  -webkit-user-drag: none;
}

#cat-row {
  margin-top: 1rem;
  margin-bottom: -2rem;
}

.tap-assessment-panel {
  width: min(720px, calc(100% - 24px));
  margin: clamp(1.2rem, 4vw, 2rem) auto 0;
}

.mobile-quick-controls {
  display: none;
}

.tap-practice-shell {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  border: 1px solid rgba(31, 31, 31, 0.06);
  border-radius: 18px;
  background: rgba(248, 248, 248, 0.98);
  padding: 0.5rem 0.75rem;
  box-shadow: 0 14px 28px rgba(61, 23, 17, 0.1);
}

.tap-panel-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  justify-content: center;
  flex: 0 0 auto;
  align-items: center;
  position: relative;
}

.tap-panel-action {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 14px;
  background: #fff;
  color: #1f1f1f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(36, 15, 12, 0.06);
}

.tap-panel-action.active,
.tap-panel-action[aria-pressed="true"] {
  background: linear-gradient(180deg, #ff6b54 0%, #ff523d 100%);
  border-color: #ff523d;
  color: #fff;
}

.tap-panel-action.is-suppressed {
  visibility: hidden;
  pointer-events: none;
}

.tap-panel-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.tap-stop-button {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.tap-mode-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.tap-mode-btn {
  min-height: 42px;
  border: 1px solid rgba(31, 31, 31, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: #1f1f1f;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(36, 15, 12, 0.08);
}

.tap-mode-btn.active,
.tap-mode-btn[aria-pressed="true"] {
  background: linear-gradient(180deg, #ff6b54 0%, #ff523d 100%);
  border-color: #ff523d;
  color: #ffffff;
}

.tap-pad {
  position: relative;
  flex: 1 1 auto;
  min-height: clamp(112px, 18vw, 172px);
  min-width: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: #ffffff;
  color: #1f1f1f;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.2rem;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  box-shadow: none;
  padding: 10px 14px;
}

.tap-pad.is-mode-picker {
  flex: 1 1 0;
  min-width: 0;
  align-items: stretch;
  justify-items: stretch;
  padding: 6px 8px;
  cursor: default;
}

.tap-pad-choice {
  position: relative;
  z-index: 2;
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  min-height: 60px;
  align-items: stretch;
}

.tap-pad.is-mode-picker .tap-pad-choice {
  display: grid;
}

.tap-pad-choice-divider {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 33.333%;
  width: 1px;
  transform: translateX(-0.5px);
  background: rgba(31, 31, 31, 0.1);
  box-shadow: 33.333% 0 0 rgba(31, 31, 31, 0.1);
  pointer-events: none;
}

.tap-pad-mode-btn {
  position: relative;
  z-index: 1;
  border: none;
  border-radius: 0;
  background: transparent;
  color: rgba(31, 31, 31, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  padding: 4px 6px;
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.tap-pad-mode-btn.active,
.tap-pad-mode-btn[aria-pressed="true"] {
  color: #ff523d;
}

.tap-pad-mode-icon {
  width: min(52px, 62%);
  height: auto;
  aspect-ratio: 1;
  flex: 0 0 auto;
}

.tap-pad-loop-icon {
  transform: scale(1.16);
}

.tap-pad-mode-text {
  max-width: 100%;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 800;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.tap-pad::after {
  content: "";
  position: absolute;
  inset: auto 18% 18px;
  height: 12px;
  border-radius: 999px;
  background: rgba(31, 31, 31, 0.08);
}

.tap-pad.is-hit {
  animation: tapPadPulse 180ms ease-out;
}

.tap-pad.is-perfect {
  border-color: #2f7d32;
  box-shadow: 0 18px 28px rgba(47, 125, 50, 0.2);
}

.tap-pad.is-good,
.tap-pad.is-ok {
  border-color: #f59d28;
  box-shadow: 0 18px 28px rgba(245, 157, 40, 0.2);
}

.tap-pad.is-miss {
  border-color: #d33b31;
  box-shadow: 0 18px 28px rgba(211, 59, 49, 0.2);
}

.tap-pad.is-mode-picker #tap-pad-label,
.tap-pad.is-mode-picker #tap-pad-sub {
  display: none;
}

.tap-pad.is-mode-picker .tap-sticks {
  display: none;
}

#tap-pad-label {
  position: relative;
  z-index: 1;
  margin-top: 1.15rem;
  max-width: 62%;
  text-align: center;
  font-size: clamp(1rem, 2.7vw, 1.35rem);
  font-weight: 900;
  letter-spacing: 0;
}

#tap-pad-label:empty,
#tap-pad-sub:empty {
  display: none;
}

#tap-pad-sub {
  position: relative;
  z-index: 1;
  color: #686868;
  font-size: 0.83rem;
  font-weight: 750;
}

.tap-sticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.tap-stick {
  position: absolute;
  top: 14px;
  width: 10px;
  height: 88px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2f2623 0%, #15100e 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform-origin: 50% 10%;
}

.tap-stick-left {
  left: 18px;
  transform: rotate(-54deg);
  animation: tapStickIdleLeft 1.4s ease-in-out infinite;
}

.tap-stick-right {
  right: 18px;
  left: auto;
  transform: rotate(54deg);
  animation: tapStickIdleRight 1.4s ease-in-out infinite;
}

.tap-pad.is-hit[data-stick-side="left"] .tap-stick-left {
  animation: tapStickLeft 180ms ease-out;
}

.tap-pad.is-hit[data-stick-side="right"] .tap-stick-right {
  animation: tapStickRight 180ms ease-out;
}

@keyframes tapPadPulse {
  0% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(4px) scale(0.995);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes assessmentDotPop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.34);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes tapStickLeft {
  0% {
    transform: rotate(-54deg);
  }
  45% {
    transform: translate(24px, 18px) rotate(-16deg);
  }
  100% {
    transform: rotate(-54deg);
  }
}

@keyframes tapStickRight {
  0% {
    transform: rotate(54deg);
  }
  45% {
    transform: translate(-24px, 18px) rotate(16deg);
  }
  100% {
    transform: rotate(54deg);
  }
}

@keyframes tapStickIdleLeft {
  0%,
  100% {
    transform: rotate(-54deg);
  }
  50% {
    transform: translate(6px, 4px) rotate(-47deg);
  }
}

@keyframes tapStickIdleRight {
  0%,
  100% {
    transform: rotate(54deg);
  }
  50% {
    transform: translate(-6px, 4px) rotate(47deg);
  }
}

.judgement {
  position: absolute;
  top: 20%;
  left: 50%;
  width: 100%;
  transform: translate(-50%, -50%);
  opacity: 0;
  font-size: calc(var(--dice-size, 80px) * 0.2);
  font-family: "Spartan MB", sans-serif;
  color: white;
  text-align: center;
  pointer-events: none;
  z-index: 1000;
}

.float-up {
  animation: floatUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ============================================
   BANNER AD PLACEHOLDER
   ============================================ */
#ad-banner-placeholder {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(120px, 12vw, 180px);
  height: clamp(320px, 70dvh, 600px);
  border-radius: 14px;
  border: 2px dashed rgba(0, 0, 0, 0.2);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.03), transparent);
  color: rgba(0, 0, 0, 0.55);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ============================================
   MISC COMPONENTS
   ============================================ */
#line {
  width: 80%;
  height: clamp(2px, 0.4vw, 3.6px);
  border-radius: clamp(5px, 1vw, 9px);
  background-color: black;
  margin: 0 auto;
  position: relative;
}

p {
  font-size: clamp(14px, 2.5vw, 21.6px);
  font-weight: bold;
  text-align: center;
}

.footer {
  text-align: center;
  font-size: clamp(0.7rem, 0.8vw, 0.8rem);
  color: #666;
  padding: 10px 0;
  margin-top: 20px;
}

#flash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: white;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
}

/* ============================================
   STATE CLASSES
   ============================================ */
.hidden {
  display: none;
}

.start-pos {
  outline: purple 2px solid;
}

.all-silent {
  opacity: 0.5;
}

.grey {
  background-color: var(--block-inactive-color, darkgray);
}

.inactive {
  background-color: var(--block-inactive-color, darkgray) !important;
}

.bounce-flash {
  animation: bounceFlash 0.2s ease;
}

.flash-now {
  animation: flash 0.3s ease-in;
}
.speed-up {
  background-image: url("assets/imgs/double-arrow-right-svgrepo-com.svg");
  background-repeat: no-repeat;
  background-position: 50% 95%; /* center the image */

  background-size: 40%; /* makes it fit inside the element */
}
.auto-block {
  position: relative;
  background-image: url("your-background.jpg"); /* your main background */
  background-size: cover;
  background-position: center;
}

/* Semi-transparent overlay */
.auto-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2); /* overlay */
  pointer-events: none;
  z-index: 1; /* under the arrow */
  border-radius: 10%;
}

/* Arrow icon on top */
.auto-block::after {
  content: "";
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 20%;
  height: 20%;
  background-color: white; /* fill color */
  mask: url("assets/imgs/robot-solid-full.svg") no-repeat center / contain;
  -webkit-mask: url("assets/imgs/robot-solid-full.svg") no-repeat center /
    contain;
  pointer-events: none;
  z-index: 2;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes shake {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(2deg);
  }
  50% {
    transform: rotate(0deg);
  }
  75% {
    transform: rotate(-2deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translate(-50%, -20%) scale(1);
  }
  30% {
    transform: translate(-50%, -70%) scale(1);
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -65%) scale(1);
  }
}

@keyframes dot-hit {
  0% {
    transform: scale(1);
    background-color: var(--dot-color, black);
  }
  30% {
    transform: scale(1.25);
    background-color: var(--dot-hit-color, white);
  }
  100% {
    transform: scale(1);
    background-color: var(--dot-hit-color, white);
  }
}
svg {
  overflow: visible !important;
}
@keyframes silent-hit {
  0% {
    transform: scale(1);
    opacity: 0.2;
  }
  30% {
    transform: scale(1.25);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    opacity: 0.2;
  }
}

@keyframes die-hit {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes bounceFlash {
  0% {
    transform: scale(1) translateY(0);
    fill: #1f1f1f;
    filter: brightness(1);
  }
  30% {
    transform: scaleY(1) translateY(3px);
    fill: #fb6354;
    filter: drop-shadow(0 0 6px rgba(251, 99, 84, 0.55));
  }
  60% {
    transform: scaleY(1) translateY(1px);
    fill: #fb6354;
    filter: drop-shadow(0 0 6px rgba(251, 99, 84, 0.35));
  }
  100% {
    transform: scale(1) translateY(0);
    fill: #1f1f1f;
    filter: brightness(1);
  }
}

@keyframes ripple-animation {
  to {
    transform: scale(0.5);
    opacity: 0;
  }
}

@keyframes pop-judgement {
  0% {
    transform: translate(-50%, 28vh) scale(1.5);
    opacity: 0;
  }
  20% {
    transform: translate(-50%, 28vh) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, 28.4vh) scale(1);
    opacity: 0;
  }
}

@keyframes flash {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
  }
}
#rank-letter {
  font-size: 10rem;
}
.slow-down {
  background-image: url("assets/imgs/double-arrow-left-svgrepo-com.svg");
  background-repeat: no-repeat;
  background-position: 50% 95%; /* center the image */

  background-size: 40%; /* makes it fit inside the element */
}

.bpm-chips {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  width: 100%;
  justify-content: space-between;
}

.bpm-chip {
  flex: 1;
  padding: 6px 4px;
  font-size: 0.8rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  color: #333;
  font-weight: 600;
  text-align: center;
}
.fa-play{
  transform: translateX(.1rem); /* tweak this */
}
.bpm-chip:active {
  background: #f85c48;
  color: white;
  border-color: #f85c48;
}
#title {
  margin-left: 0;
  font-size: 4rem;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  overflow: hidden;
}
/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (min-width: 712px) {
  span{
    font-size: 20px;
  }
  .form-group label{
    font-size: 20px;
  }
  .settings-content h3{
    font-size: 24px;
  }
  .form-group label{
    font-size: 20px;
  }
  :root {
    --dice-size-base: 120px !important;
  }
  .quarter-wrapper #quarter-p {
   
    font-size: 1.5rem;
  }
  #cat-row .quarter-wrapper svg{
    height: 1.5rem;
    width: auto;
  }
  svg{
    font-size: 1.5rem;
  }
  .navbar-title{
   font-size: 2rem;
  }
  button .metro-icon-img{
    width: 2rem;
  height: auto;
  }
  .floating-controls .divider {
   height: 3rem;
    margin: 0 2px;
  }
#page .floating-controls {

  
  /* Safe area top + 5px buffer */
  top: 10dvh; 
  gap: 1rem;
 
}

  .floating-controls .bb-button {
    padding: 0 !important;
    min-width: 4rem !important;
    width: 4rem !important;
    height: 4rem !important;
    border-radius: 50% !important;
   
  }
  



 /*  .title-row #title {
    font-size: 3rem;
  } */
  html {
    font-size: 16px;
  }
}
@media (max-width: 1024px) {
  
  #title {
    font-size: 1.8rem;
  }
  .container-bg {
    padding-bottom: 3rem;
  }

  .button-text {
    display: none;
  }

  .quarter-wrapper svg {
    height: 1.3rem;
    width: auto;
  }
  #quarter-p {
    font-size: 1rem;
  }

  .title-row {
    margin-bottom: 1rem;
  }

  #container-bg {
    margin-top: 1rem;
    padding: 2rem 2rem 3rem;
    width: min(100vw - 16px, 760px);
  }

  .bb-button {
    padding: 5px 8px;
  }

  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw !important;
    height: 0;
    background: transparent;
    z-index: 100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    max-width: 100vw;
    transition: height 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: none;
    touch-action: pan-y;
  }

  .open-side {
    height: 70dvh;
    width: 100vw !important;
  }

  #sidebar-wrapper {
    border-left: none;
    border-top: none;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    height: 80%;

    position: absolute;
    bottom: 0;
  }

  #sidebar-wrapper .sidebar-header {
    padding: 1rem 1.25rem;
    position: relative;
    padding-top: 1.7rem;
  }

  #sidebar-wrapper .sidebar-header::before {
    content: "";
    position: absolute;
    top: 0.65rem;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 4px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.15);
  }

  #sidebar-wrapper .sidebar-content {
    padding: 1rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }



  .settings-wrapper {
    max-width: 100%;
    width: 100%;
  }

  .combobox-wrapper {
    display: flex;
    flex-direction: column;
    font-family: sans-serif;
  }
}

@media (max-width: 375px) {
  :root {
    --dice-size-base: 56px;
  }
  .quarter-wrapper svg {
    height: 1rem;
    width: auto;
  }
}

@media (max-width: 430px) {
  :root {
    --dice-size-base: 52px;
  }

  #container-bg {
    margin-top: 0.5rem;
    padding: 1rem 0.9rem 1.2rem;
    width: min(100vw - 12px, 420px);
  }

  .dice-container {
    --dice-gap: 8px;
    --grid-visible-max-height: none;
    max-height: none;
    overflow: visible;
    padding-top: 2px;
    padding-bottom: 2px;
    padding-left: 2px;
    padding-right: 2px;
  }

  #cat-row {
    margin-top: 0.45rem;
    margin-bottom: -0.9rem;
  }

  .mobile-quick-controls {
    width: min(100%, 280px);
    gap: 0.4rem;
    margin-top: 0.55rem;
  }

  .mobile-quick-action {
    height: 36px;
    border-radius: 12px;
  }

  .mobile-quick-action img,
  .mobile-quick-action svg {
    width: 16px;
    height: 16px;
  }

  .tap-assessment-panel {
    width: min(100%, 280px);
    margin-top: 0.6rem;
  }

  .tap-practice-shell {
    gap: 0.42rem;
    padding: 0.36rem 0.42rem;
    border-radius: 16px;
  }

  .tap-panel-action {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .tap-pad {
    min-height: 88px;
    padding: 8px 10px;
    border-radius: 12px;
  }

  .tap-pad-choice {
    min-height: 52px;
  }

  #tap-pad-label {
    font-size: 0.74rem;
  }

  #tap-pad-sub,
  .tap-pad-mode-text {
    font-size: 0.62rem;
  }
}

body.practice-screen,
body.ranking-screen {
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  min-height: 100dvh;
  display: block;
  align-items: stretch;
  justify-items: stretch;
  -webkit-overflow-scrolling: touch;
}

body.practice-screen #page {
  min-height: 100dvh;
  align-items: flex-start;
  justify-content: center;
  overflow: visible;
  padding: max(6px, env(safe-area-inset-top, 0px)) 0
    calc(18px + env(safe-area-inset-bottom, 0px));
}

body.practice-screen .top-navbar {
  height: auto;
  min-height: 58px;
  padding-top: max(8px, env(safe-area-inset-top, 0px));
  padding-bottom: 8px;
}

body.practice-screen #root-back-button {
  min-height: 40px;
  padding: 0 0.92rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 244, 240, 0.98));
  border: 1px solid rgba(255, 82, 61, 0.16);
  color: #ff523d;
  box-shadow: 0 10px 24px rgba(87, 29, 20, 0.08);
}

body.practice-screen #root-back-button .navbar-button-label {
  display: inline-flex;
}

body.practice-screen .navbar-logo {
  width: 28px;
  height: 28px;
}

body.practice-screen .navbar-title {
  font-size: clamp(0.95rem, 3.2vw, 1.08rem);
}

body.practice-screen #container-bg {
  margin-top: clamp(8px, 2vw, 18px);
  margin-bottom: clamp(18px, 4vw, 28px);
}

@media (max-width: 640px) {
  body.practice-screen {
    --dice-size-base: 42px;
  }

  body.practice-screen #page {
    min-height: auto;
    padding-top: max(4px, env(safe-area-inset-top, 0px));
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    padding-left: 0;
    padding-right: 0;
  }

  body.practice-screen .top-navbar {
    min-height: 42px;
    padding-left: 0.64rem;
    padding-right: 0.64rem;
    padding-bottom: 5px;
  }

  body.practice-screen .top-navbar .navbar-left {
    gap: 0.55rem;
  }

  body.practice-screen .brand-lockup {
    gap: 0.42rem;
  }

  body.practice-screen .navbar-button {
    font-size: 1rem;
  }

  body.practice-screen #root-back-button {
    min-height: 34px;
    padding: 0 0.72rem;
    gap: 0.35rem;
  }

  body.practice-screen #root-back-button .navbar-button-label {
    font-size: 0.78rem;
  }

  body.practice-screen #container-bg {
    width: min(100vw - 8px, 408px);
    min-height: calc(100dvh - max(52px, env(safe-area-inset-top, 0px) + 42px) - env(safe-area-inset-bottom, 0px) - 10px);
    display: flex;
    flex-direction: column;
    padding: 0.56rem 0.52rem 0.68rem;
    border-radius: 16px;
  }

  body.practice-screen .title-row {
    display: none;
  }

  body.practice-screen .dice-container {
    --dice-gap: 5px;
    --grid-visible-max-height: none;
    max-height: none;
    overflow: visible;
    padding-top: 1px;
    padding-bottom: 1px;
    padding-left: 1px;
    padding-right: 1px;
  }

  body.practice-screen #cat-row {
    display: none;
  }

  body.practice-screen .quarter-wrapper svg {
    width: 0.5rem;
    margin: 0.28rem;
  }

  body.practice-screen #quarter-p {
    font-size: 0.86rem;
  }

  body.practice-screen .mobile-quick-controls {
    display: grid;
    width: min(100%, 270px);
    gap: 0.18rem;
    margin-top: 0.22rem;
  }

  body.practice-screen .mobile-quick-action {
    height: 30px;
    border-radius: 9px;
  }

  body.practice-screen .mobile-quick-action img,
  body.practice-screen .mobile-quick-action svg {
    width: 14px;
    height: 14px;
  }

  body.practice-screen .tap-assessment-panel {
    width: min(100%, 270px);
    margin-top: auto;
  }

  body.practice-screen .tap-practice-shell {
    gap: 0.22rem;
    padding: 0.22rem 0.26rem;
    border-radius: 12px;
  }

  body.practice-screen .tap-panel-action {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  body.practice-screen .tap-pad {
    min-height: 60px;
    padding: 4px 6px;
    border-radius: 10px;
  }

  body.practice-screen .tap-pad-choice {
    min-height: 34px;
  }

  body.practice-screen #tap-pad-label {
    font-size: 0.56rem;
  }

  body.practice-screen #tap-pad-sub,
  body.practice-screen .tap-pad-mode-text {
    font-size: 0.48rem;
  }

  body.practice-screen .assessment-progress {
    min-height: 5px;
    gap: 3px;
  }

  body.practice-screen .assessment-progress-segment {
    height: 5px;
  }
}

@media (max-width: 430px) {
  body.practice-screen {
    --dice-size-base: 38px;
  }

  body.practice-screen #page {
    padding-top: max(12px, env(safe-area-inset-top, 0px));
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  }

  body.practice-screen .top-navbar {
    min-height: 38px;
    padding-left: 0.54rem;
    padding-right: 0.54rem;
    padding-bottom: 4px;
  }

  body.practice-screen .top-navbar .navbar-left {
    gap: 0.38rem;
  }

  body.practice-screen .brand-lockup {
    display: none;
  }

  body.practice-screen .navbar-logo {
    width: 24px;
    height: 24px;
    border-radius: 8px;
  }

  body.practice-screen .navbar-title {
    display: none;
  }

  body.practice-screen .navbar-button {
    font-size: 0.92rem;
  }

  body.practice-screen .navbar-right {
    display: none;
  }

  body.practice-screen #container-bg {
    width: min(100vw - 2px, 428px) !important;
    height: calc(100dvh - max(14px, env(safe-area-inset-top, 0px) + 12px) - env(safe-area-inset-bottom, 0px) - 2px);
    min-height: calc(100dvh - max(14px, env(safe-area-inset-top, 0px) + 12px) - env(safe-area-inset-bottom, 0px) - 2px);
    margin-top: 4px;
    margin-bottom: 2px;
    padding: 0.72rem 0.4rem 0.62rem;
  }

  body.practice-screen .dice-container {
    padding-top: 10px;
  }

  body.practice-screen #quarter-p {
    display: none;
  }

  body.practice-screen .mobile-quick-controls {
    display: none;
  }

  body.practice-screen .tap-assessment-panel,
  body.practice-screen .tap-practice-shell {
    width: min(100%, 232px);
  }

  body.practice-screen .tap-assessment-panel {
    margin-top: auto;
    padding-top: 0.3rem;
  }

  body.practice-screen .tap-practice-shell {
    min-height: 204px;
    padding: 0.18rem 0.22rem;
    gap: 0.18rem;
  }

  body.practice-screen .tap-panel-actions {
    justify-content: space-between;
    gap: 0.34rem;
  }

  body.practice-screen .tap-panel-action {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  body.practice-screen .tap-pad {
    min-height: 148px;
    padding: 4px 5px;
  }

  body.practice-screen .tap-pad-choice {
    min-height: 108px;
  }

  body.practice-screen .assessment-progress {
    min-height: 4px;
    gap: 2px;
  }

  body.practice-screen .assessment-progress-segment {
    height: 4px;
  }
}

@media (max-width: 430px) and (max-height: 780px) {
  body.practice-screen {
    --dice-size-base: 34px;
  }

  body.practice-screen #page {
    padding-top: max(12px, env(safe-area-inset-top, 0px));
    padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
  }

  body.practice-screen .top-navbar {
    min-height: 32px;
    padding-top: max(2px, env(safe-area-inset-top, 0px));
    padding-bottom: 2px;
    padding-left: 0.42rem;
    padding-right: 0.42rem;
  }

  body.practice-screen .navbar-button {
    font-size: 0.84rem;
  }

  body.practice-screen .brand-lockup {
    display: none;
  }

  body.practice-screen .navbar-right {
    display: none;
  }

  body.practice-screen #container-bg {
    width: min(100vw - 2px, 428px) !important;
    height: calc(100dvh - max(10px, env(safe-area-inset-top, 0px) + 8px) - env(safe-area-inset-bottom, 0px));
    min-height: calc(100dvh - max(10px, env(safe-area-inset-top, 0px) + 8px) - env(safe-area-inset-bottom, 0px));
    margin-top: 8px;
    margin-bottom: 2px;
    padding: 0.58rem 0.3rem 0.42rem;
    border-radius: 14px;
  }

  body.practice-screen .dice-container {
    --dice-gap: 4px;
    padding: 10px 0 0;
  }

  body.practice-screen .tap-assessment-panel,
  body.practice-screen .tap-practice-shell {
    width: min(100%, 214px);
  }

  body.practice-screen .tap-assessment-panel {
    margin-top: auto;
    padding-top: 0.24rem;
  }

  body.practice-screen .tap-practice-shell {
    min-height: 174px;
    padding: 0.14rem 0.16rem;
    gap: 0.14rem;
    border-radius: 10px;
  }

  body.practice-screen .tap-panel-actions {
    justify-content: space-between;
    gap: 0.28rem;
  }

  body.practice-screen .tap-panel-action {
    width: 24px;
    height: 24px;
    border-radius: 7px;
  }

  body.practice-screen .tap-pad {
    min-height: 122px;
    padding: 3px 4px;
    border-radius: 9px;
  }

  body.practice-screen .tap-pad-choice {
    min-height: 88px;
  }

  body.practice-screen #tap-pad-label {
    font-size: 0.5rem;
  }

  body.practice-screen #tap-pad-sub,
  body.practice-screen .tap-pad-mode-text {
    font-size: 0.44rem;
  }

  body.practice-screen .assessment-progress {
    min-height: 3px;
    gap: 2px;
  }

  body.practice-screen .assessment-progress-segment {
    height: 3px;
  }
}

@media (max-width: 430px) {
  body.practice-screen .sidebar:not(.open-side) {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
  }

  body.practice-screen .sidebar:not(.open-side) #sidebar-wrapper,
  body.practice-screen .sidebar:not(.open-side) #controls,
  body.practice-screen .sidebar:not(.open-side) #restModal {
    display: none !important;
    height: 0 !important;
    opacity: 0 !important;
  }
}

@media (min-width: 1440px) {
  :root {
    --dice-size-base: 80px !important;
  }
  svg
}

/* ============================================
   RESULTS SCREEN
   ============================================ */
#results-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  animation: fadeIn 0.5s forwards;
  pointer-events: auto;
}

#results-screen.hidden {
  display: none !important;
}

.results-content {
  background: white;
  padding: 3rem;
  border-radius: 20px;
  text-align: center;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  animation: slideUp 0.5s 0.2s forwards;
  opacity: 0;
}

.results-content h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: #333;
  font-weight: 800;
}

.rank-display {
  font-size: 8rem;
  font-weight: 900;
  margin: 1rem 0;
  color: #fb6354;
  text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
  text-align: left;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
  padding: 0.5rem 0;
  font-weight: 600;
  color: #555;
  font-size: 0.9rem;
}

.stat-value {
  color: #333;
  font-weight: 800;
}

.results-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   PLAY MODE
   ============================================ */
.play-mode .dice-ui,
.play-mode .sidebar {
  display: none !important;
}

.play-mode #dice-container {
  pointer-events: none !important; /* Disable interaction with blocks */
}

#start-prompt {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 800;
  color: #333;
  opacity: 0.5;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  animation: pulse 2s infinite;
  text-align: center;
  width: 100%;
  z-index: 2000;
}

.play-mode #start-prompt {
  display: block;
}

.play-mode #start-prompt.hidden {
  display: none;
}

@keyframes pulse {
  0% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    opacity: 0.3;
  }
}

.play-mode.playing #start-prompt {
  display: none;
}

/* ============================================
   BOTTOM NAVIGATION BAR
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 60px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 3000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;
  cursor: pointer;
  transition: color 0.2s ease;
  flex: 1;
  height: 100%;
}

.nav-item svg.fa-solid {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.nav-item span {
  font-size: 0.7rem;
  font-weight: 600;
}

/* Navigation Overlay (Mobile Page Slide) */
.nav-content-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: calc(100dvh - 60px); /* minus bottom nav height */
  background: #f8f9fa; /* Full opaque background for page feel */
  z-index: 2999;
  display: flex;
  flex-direction: column;
  /* Slide in from right effect */
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 1; /* Always opaque, handled by transform */
  pointer-events: auto; /* Always interactive */
}

/* Specific class to slide it in */
.nav-content-overlay.visible {
  transform: translateX(0);
}

.nav-content-overlay.hidden {
  /* Can use transform offscreen instead of display none to allow transition out */
  transform: translateX(100%);
  /* display: none;  <-- Don't use this if we want exit animation */
}

#overlay-header {
  display: flex;
  justify-content: center; /* Center title like iOS nav bars */
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}

#overlay-header h2 {
  margin: 0;
  font-size: 1.1rem;
  color: #000;
  font-weight: 600;
}

#close-overlay {
  position: absolute;
  right: 1rem; /* standard "Done" or "Close" button position */
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #007aff; /* iOS blue-ish */
  cursor: pointer;
}

#overlay-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

/* Level List Item (Reused) */
.level-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 16px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.level-info h3 {
  margin: 0 0 0.3rem 0;
  font-size: 1.1rem;
  color: #333;
}

.level-info svg.fa-solid {
  margin-right: 0.5rem;
  color: #555;
  font-size: 1.2rem;
}

.level-info p {
  margin: 0;
  font-size: 0.85rem;
  color: #888;
  font-weight: 600;
}

.center-content {
  text-align: center;
  padding: 3rem 1rem;
  color: #555;
}

.center-content h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: #333;
}

/* ============================================
   PROJECT MODAL & NEW UI
   ============================================ */
/* Specific override for the project modal wrapper to align left */
/* Specific override for the project modal wrapper to align left */
#project-modal {
  overflow-y: auto;
  justify-content: flex-start; /* Align flex items to start (left) */
  align-items: flex-start;
  padding: 0;
  z-index: 4000; /* Ensure it is above bottom-nav (z-index 3000) */
}

.project-modal-content {
  width: 600px; /* Fixed smaller width */
  max-width: 90vw;
  height: 100dvh; /* Full height sidebar (accounts for browser UI) */
  background: var(--modal-bg);
  backdrop-filter: blur(10px);
  border-radius: 16px 16px 16px 16px; /* Rounded corners only on right */
  padding: 0;
  overflow: hidden; /* Main container hidden, inner form scrolls */
  box-shadow: 5px 0 30px rgba(0, 0, 0, 0.15);
  text-align: left;
  animation: slideInLeft 0.3s ease-out;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: calc(env(safe-area-inset-top, 2rem) + 0.5rem);
  padding-left: 1.5rem;
  padding-right: 1.5rem;

  background: #f8f9fa;
  border-bottom: 1px solid #eee;
  flex-shrink: 0; /* Prevent header shrinking */
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
}

.project-form {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  flex: 1; /* Push footer to bottom */
  overflow-y: auto; /* Scroll form if too tall */
  min-height: 0; /* Important for flex child scrolling */
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group-inline {
  flex-direction: row !important;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.form-group label {
  font-weight: 600;
  color: #555;

}

.form-group input {
  padding: 0.8rem;
  border: 2px solid #eee;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
  font-family: inherit;
}

.form-group input:focus {
  border-color: #f85c48;
  outline: none;
}

.file-upload-area {
  border: 2px dashed #ddd;
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
  background: #fdfdfd;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.file-upload-area.has-audio {
  border-color: #4caf50;
  background: #f1fff3;
}

.file-upload-area.has-audio svg.fa-solid {
  color: #2f7d32;
}

.file-upload-area.has-audio p {
  color: #1f5f29;
  font-weight: 600;
}

.file-upload-area svg.fa-solid {
  font-size: 2rem;
  color: #ccc;
  margin-bottom: 0.5rem;
}

.file-upload-area p {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
  font-weight: normal;
}

.small-btn {
  background: white;
  border: 1px solid #ccc;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  transition: all 0.2s;
}

.modal-actions {
  padding: 1.5rem 2rem;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  background: #f8f9fa;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0; /* Prevent footer shrinking */
}

.bb-button.primary {
  background: #f85c48;
  width: 100%;
  height: 3rem;
  font-size: 1.1rem;
}

.bb-button.sec-btn {
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.divider {
  width: 1px;
  height: 2rem;
  background: #e0e0e0;
  margin: 0 0.5rem;
}

/* Make dice-ui nicer */
.dice-ui {
  transform: translateY(.5rem);
  padding: 0.5rem 1rem;
  gap: 0.8rem;
  width: auto;
  min-width: fit-content;
}

.top-navbar .dice-ui {
  background: none !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
}

.metro-icon-img {
  width: 1.2rem;
  height: 1.2rem;
  filter: grayscale(1) brightness(0.2);
}

[data-theme="dark"] .metro-icon-img {
  filter: grayscale(1) invert(1) brightness(1);
}

.close-button {
  font-size: 1.5rem;
  padding: 0.5rem;
  margin-right: -0.5rem;
}

@media (max-width: 600px) {
  .project-modal-content {
    width: 95%;
  }
}

/* ============================================
   KEYBIND INFO GRID
   ============================================ */
.keybind-info-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.keybind-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}

.keybind-row:last-child {
  border-bottom: none;
}

.key-label {
  background: #f0f0f0;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 600;
  color: #333;
  border: 1px solid #ddd;
}

/* ============================================
   TOP NAVBAR & DARK MODE
   ============================================ */
:root {
  --bg-color: #fff5f2;
  --text-color: #251c1a;
  --navbar-bg: rgba(255, 250, 248, 0.84);
  --modal-bg: rgba(255, 250, 248, 0.96);
  --button-sec-bg: #fff8f6;
  --button-sec-text: #251c1a;
  --panel-bg: #fffdfc;
  --border-color: rgba(76, 37, 31, 0.14);
  --dropdown-bg: #fffaf8;
  --dropdown-hover: #ffe8e1;
  --brand-primary: #ff523d;
  --brand-soft: #ffe3dc;
  --brand-deep: #2a201d;
}

[data-theme="dark"] {
  --bg-color: #130d0b;
  --text-color: #fff4f0;
  --navbar-bg: rgba(26, 17, 14, 0.88);
  --modal-bg: rgba(22, 15, 12, 0.96);
  --button-sec-bg: #261916;
  --button-sec-text: #fff4f0;
  --panel-bg: #1a120f;
  --border-color: rgba(255, 143, 126, 0.2);
  --dropdown-bg: #231714;
  --dropdown-hover: #38211d;

  --block-inactive-color: #444;
  --bb-sec-btn-bg: #261916;
  --bb-sec-btn-border: rgba(255, 143, 126, 0.24);
  --bb-sec-btn-text: #fff4f0;
  --bb-sec-btn-hover-bg: #38211d;
}

body {
  background-color: var(--bg-color) !important;
  color: var(--text-color) !important;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#container-bg {
  background-color: var(--panel-bg);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.title-row h2 {
  color: var(--text-color) !important;
}

.bb-button.sec-btn {
  background: var(--bb-sec-btn-bg, #fff) !important;
  color: var(--bb-sec-btn-text, #333) !important;
  border-color: var(--bb-sec-btn-border, #ddd) !important;
}

.bb-button.active {
  background: #f85c48 !important;
  color: #fff !important;
  border-color: #f85c48 !important;
  box-shadow: 0 0 10px rgba(248, 92, 72, 0.4) !important;
  animation: pulse-border 2s infinite;
}

.bb-button.inactive {
  opacity: 0.6;
  filter: grayscale(0.5);
}

@keyframes pulse-border {
  0% {
    box-shadow: 0 0 0 0 rgba(248, 92, 72, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(248, 92, 72, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(248, 92, 72, 0);
  }
}

.top-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 60px;
  
  /* Standard flex settings */
  display: flex;
  justify-content: space-between;
  
  /* Align to the bottom so padding pushes content down */
  align-items: flex-end; 
  
  /* Add padding to the top for the notch, and the bottom to center icons in the 60px bar */
  padding-top: env(safe-area-inset-top, 0px); 
  padding-bottom: 15px; /* Adjust this to visually center your 1.4rem icons */
  
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  
  background: var(--navbar-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 3000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.top-navbar .navbar-title {
  font-weight: 800;
  display: flex;
  align-items: center;
  color: var(--text-color);
  margin: 0;
  line-height: 1;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.navbar-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(255, 82, 61, 0.22);
}

.top-navbar .navbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.top-navbar .dice-ui.desktop-only {
  flex: 2;
  justify-content: center;
  margin-top: 0;
}

.top-navbar .navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: flex-end;
}

.navbar-left,
.navbar-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.navbar-button {
  background: none;
  border: none;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-color);
  cursor: pointer;
  transition: transform 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
}

.navbar-button-label {
  display: none;
  font-size: 0.9rem;
  font-weight: 800;
}

.practice-home-button {
  position: fixed;
  top: calc(max(10px, env(safe-area-inset-top, 0px)) + 6px);
  left: 12px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 40px;
  padding: 0 0.9rem;
  border: 1px solid rgba(255, 82, 61, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.97);
  color: #ff523d;
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(87, 29, 20, 0.12);
}

.practice-home-button.hidden {
  display: none;
}

#root-back-button.hidden {
  display: none;
}

.navbar-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  text-align: center;
  color: var(--text-color);
  width: auto;
}

.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 10px;
  background: var(--dropdown-bg);
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  overflow: hidden;
  z-index: 4000;
  flex-direction: column;
  padding: 0.5rem 0;
}

/* Removed hover for mobile app (uses focus-within) */
/* .nav-dropdown:hover .nav-dropdown-menu, */
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-item {
  padding: 12px 20px;
  text-decoration: none;
  color: var(--text-color);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
}

.nav-dropdown-item:active {
  background-color: var(--dropdown-hover);
  color: #f85c48;
}
.fa-xmark {
  width: 1rem;
  height: 1rem;
}
@media (max-width: 1024px) {
  .app-root-selector-card {
    padding: 1.1rem;
    border-radius: 24px;
  }

  .app-root-selector-actions,
  .theory-overview,
  .theory-workspace,
  .theory-feature-grid,
  .theory-feature-meta {
    grid-template-columns: 1fr;
  }

  .theory-root-shell {
    border-radius: 24px;
    padding: 1rem;
  }

  .theory-root-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .theory-root-shell.is-hub .theory-root-header {
    flex-direction: row;
    align-items: center;
  }

  .theory-root-shell.is-hub .theory-root-header-copy {
    width: auto;
    justify-items: start;
  }

  .theory-feature-hero-top {
    display: grid;
    gap: 0.7rem;
  }

  .desktop-only {
    display: none !important;
  }

  .theory-root {
    padding-inline: 0.7rem;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 1.2rem);
  }

  .theory-root-shell {
    width: 100%;
    border-radius: 22px;
  }

  .theory-feature-hero-art {
    width: min(132px, 34vw);
  }

  .top-navbar {
    height: 60px;
    padding-top: calc(env(safe-area-inset-top, 140px) + 1.5rem);
    padding-bottom: 15px;
  }

  .top-navbar .navbar-left {
    flex: 1;
  }

  .top-navbar .navbar-title {
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .top-navbar .navbar-left > .navbar-button {
    display: none;
  }

  .navbar-logo {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .navbar-title {
    font-size: 1rem;
  }

  /* Floating controls for mobile & tablet */
  .floating-controls {
    display: none !important;
  }

  .mobile-quick-controls {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.55rem;
    width: min(460px, calc(100% - 20px));
    margin: 0.9rem auto 0;
  }

  .mobile-quick-action {
    min-width: 0;
    height: 44px;
    border: 1px solid rgba(76, 37, 31, 0.08);
    border-radius: 14px;
    background: rgba(255, 250, 248, 0.97);
    color: #251c1a;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 22px rgba(42, 20, 16, 0.08);
    cursor: pointer;
  }

  .mobile-quick-action img,
  .mobile-quick-action svg {
    width: 18px;
    height: 18px;
  }

  .floating-controls .bb-button {
    padding: 0 !important;
    min-width: 40px;
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    font-size: 1rem;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .floating-controls .divider {
   
    margin: 0 2px;
  }

  #mobile-project-button,
  #cadence-loop-toggle-mobile,
  #listen-mobile,
  #play-mobile {
    display: none !important;
  }

  .tap-mode-bar {
    display: none;
  }

  .tap-assessment-panel {
    width: min(460px, calc(100% - 20px));
    margin-top: 1rem;
  }

  body {
    padding-bottom: 40px;
  }

  #container-bg {
    padding-bottom: 40px;
  }

  .tap-practice-shell {
    gap: 0.55rem;
    padding: 0.45rem 0.55rem;
    border-radius: 18px;
  }

  .tap-panel-action {
    width: 42px;
    height: 42px;
  }

  .tap-pad {
    min-height: 104px;
  }

  .tap-pad-mode-icon {
    width: min(50px, 62%);
  }

  .tap-pad-mode-text {
    font-size: 12px;
  }
}

@media (max-width: 1024px) and (orientation: portrait) {
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] {
    padding: 6px 8px calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 6px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-header {
    gap: 8px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-metronome-back,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-metronome-calibrate-btn--top {
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.76rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading h3 {
    font-size: clamp(1.68rem, 3.8vw, 2.2rem);
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading p {
    max-width: 34ch;
    font-size: 0.74rem;
    line-height: 1.1;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-shell {
    padding: 10px 10px 8px;
    gap: 8px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-title {
    font-size: 0.84rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-dot {
    width: 22px;
    height: 22px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-step strong {
    font-size: 0.72rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-shell {
    grid-template-columns: minmax(72px, 86px) minmax(0, 1fr) minmax(72px, 86px);
    gap: 6px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard {
    min-height: 78px;
    padding: 6px 5px;
    border-radius: 16px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-icon {
    font-size: 1.4rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard strong {
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-kicker,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-sub {
    font-size: 0.56rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub {
    max-width: 256px;
    gap: 2px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-kicker,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub #ghost-metronome-combo-sub {
    font-size: 0.74rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub strong {
    font-size: clamp(1.65rem, 3.5vw, 2.15rem);
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-praise {
    min-height: 24px;
    padding: 0 10px;
    font-size: 0.68rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-ring {
    max-width: 204px;
    min-height: 88px;
    padding: 7px 10px 7px;
    border-width: 3px;
    box-shadow: inset 0 0 0 6px rgba(255,255,255,0.88), 0 0 0 8px rgba(255, 82, 61, 0.08);
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-ring-icon {
    font-size: 1rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-mode-title {
    font-size: 0.94rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle {
    min-width: 150px;
    min-height: 32px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle-option,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle-badge {
    font-size: 0.64rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-waveform {
    min-height: 10px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-waveform span {
    width: 3px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-stars {
    font-size: 0.64rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-grid {
    grid-auto-rows: minmax(80px, auto);
    gap: 6px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad {
    min-height: 80px;
    padding: 7px 6px 6px;
    border-radius: 16px;
    gap: 3px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-face {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-icon {
    font-size: 0.98rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-face strong {
    font-size: 0.68rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-label,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-now {
    font-size: 0.54rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-label {
    min-height: 20px;
    padding: 0 7px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-controls {
    grid-template-columns: minmax(138px, 1fr) 1fr;
    gap: 6px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-shell,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar {
    padding: 6px 8px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-label,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar strong,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar span {
    font-size: 0.56rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bottom-panel {
    grid-template-columns: minmax(118px, 1fr) 112px minmax(118px, 1fr);
    gap: 6px;
    padding: 8px;
    border-radius: 20px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad {
    width: 112px;
    height: 112px;
    padding: 8px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad-icon {
    font-size: 1.38rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad strong {
    font-size: 0.84rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad-caption {
    font-size: 0.62rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card {
    min-height: 112px;
    padding: 8px;
    gap: 5px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card strong {
    font-size: 0.78rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card span {
    font-size: 0.64rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-ghost {
    font-size: 1.7rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-start-btn {
    min-height: 42px;
    width: min(100%, 250px);
    font-size: 0.84rem;
  }
}

@keyframes cadenceSheetIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.mobile-bottom-dock {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-bottom-dock {
    display: none !important;
  }

  .mobile-dock-side,
  .mobile-dock-main {
    pointer-events: auto;
  }

  .mobile-dock-side {
    display: grid;
    gap: 0.65rem;
  }

  .mobile-dock-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 248, 246, 0.96);
    border: 1px solid rgba(76, 37, 31, 0.08);
    box-shadow: 0 18px 40px rgba(42, 20, 16, 0.18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .mobile-side-action,
  .mobile-dock-main-btn {
    border: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: #251c1a;
  }

  .mobile-side-action {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255, 250, 248, 0.97);
    border: 1px solid rgba(76, 37, 31, 0.08);
    box-shadow: 0 12px 28px rgba(42, 20, 16, 0.14);
  }

  .mobile-dock-main-btn {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(76, 37, 31, 0.06);
  }

  .mobile-dock-side-right {
    gap: 0.55rem;
  }

  .mobile-dock-main-btn.active,
  .mobile-dock-main-btn[aria-pressed="true"] {
    background: linear-gradient(180deg, #ff6b54 0%, #ff523d 100%);
    color: #fff;
    box-shadow: 0 14px 28px rgba(255, 82, 61, 0.24);
  }

  .mobile-dock-play {
    background: linear-gradient(180deg, #ff6b54 0%, #ff523d 100%);
    color: #fff;
    box-shadow: 0 14px 28px rgba(255, 82, 61, 0.24);
  }
}

[data-theme="dark"] .online-library-folder,
[data-theme="dark"] .online-library-item,
[data-theme="dark"] .mobile-side-action,
[data-theme="dark"] .mobile-dock-main,
[data-theme="dark"] .mobile-dock-main-btn,
[data-theme="dark"] .tap-mode-btn,
[data-theme="dark"] .tap-assessment-stats span,
[data-theme="dark"] .tap-pad {
  background: rgba(31, 22, 18, 0.96);
  color: #fff4f0;
  border-color: rgba(255, 143, 126, 0.14);
}

[data-theme="dark"] .online-library-folder-copy span,
[data-theme="dark"] .online-library-item-meta,
[data-theme="dark"] .online-library-item-desc,
[data-theme="dark"] .online-library-folder-chevron {
  color: #d9b0a7;
}

@media (min-width: 1025px) {
  .mobile-only {
    display: none !important;
  }
}

@media (max-width: 399px) {
  .mobile-quick-controls {
    gap: 0.4rem;
  }

  .mobile-quick-action {
    height: 40px;
    border-radius: 12px;
  }

  .floating-controls .bb-button {
    min-width: 34px;
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }
}

.sidebar .sidebar-wrapper,
#sidebar-wrapper,
.settings-wrapper .project-modal-content,
.results-content,
#restModal {
  background: var(--modal-bg) !important;
  color: var(--text-color) !important;
}

.results-content h2,
.results-content .stat-item {
  color: var(--text-color) !important;
}

.modal-header,
.modal-actions {
  background: var(--dropdown-bg) !important;
  border-color: var(--border-color) !important;
}

/* Mobile Sidebar Overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 4000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-sidebar {
  position: absolute;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100dvh;
  background: var(--modal-bg);
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
}

.mobile-nav-overlay.visible .mobile-nav-sidebar {
  left: 0;
}

.mobile-nav-header {
  padding-top: calc(env(safe-area-inset-top) + 1.2rem);
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-nav-header h2 {
  margin: 0;
  color: var(--text-color);
  font-size: 1.25rem;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s;
}

.mobile-nav-item:active {
  background: var(--dropdown-hover);
  color: #f85c48;
}

/* Extended Dark Mode Elements */
[data-theme="dark"] .dice-ui,
[data-theme="dark"] .floating-controls {
  background: var(--navbar-bg) !important;
}

[data-theme="dark"] .floating-controls .divider {
  background: rgba(255, 255, 255, 0.2);
}

.mobile-nav-item svg.fa-solid {
  font-size: 1.2rem;
  width: 25px;
  text-align: center;
  color: var(--text-color);
  opacity: 0.9;
}

[data-theme="dark"] .mobile-nav-item svg.fa-solid {
  color: var(--text-color);
}

[data-theme="dark"] .sidebar-content.project-form,
[data-theme="dark"] .sidebar-main-stack {
  background: transparent !important;
}

[data-theme="dark"] #sidebar-wrapper .note-settings-drawer {
  background: var(--panel-bg);
  border-color: var(--border-color);
  color: var(--text-color);
}

[data-theme="dark"] #sidebar-wrapper .note-settings-summary {
  color: var(--text-color);
}

[data-theme="dark"] .key-label,
[data-theme="dark"] .keybind-tag,
[data-theme="dark"] input:not([type="checkbox"]):not([type="range"]),
[data-theme="dark"] select.combobox,
[data-theme="dark"] #sidebar-wrapper .sidebar-combobox,
[data-theme="dark"] .dice-preview {
  background: var(--dropdown-bg) !important;
  color: var(--text-color) !important;
  border-color: var(--border-color) !important;
  box-shadow: none;
}

[data-theme="dark"] .modal-header h2,
[data-theme="dark"] .form-group label,
[data-theme="dark"] #sidebar-wrapper .form-group > label,
[data-theme="dark"] .tooltip-text,
[data-theme="dark"] .tooltip label,
[data-theme="dark"] .file-upload-area p,
[data-theme="dark"] .form-check-label,
[data-theme="dark"] #sidebar-wrapper .form-check-label,
[data-theme="dark"] .settings-drawer-title,
[data-theme="dark"] .settings-drawer-subtitle,
[data-theme="dark"] h3.setting-section {
  color: var(--text-color) !important;
}

[data-theme="dark"] .settings-drawer {
  background: var(--panel-bg);
  border-color: var(--border-color);
}

[data-theme="dark"] .settings-drawer-summary svg.fa-solid {
  color: var(--text-color);
}

[data-theme="dark"] .settings-drawer-dot {
  border-color: rgba(255, 255, 255, 0.25);
}

[data-theme="dark"] .small-btn {
  background: var(--bb-sec-btn-bg);
  color: var(--text-color);
  border-color: var(--border-color);
}

[data-theme="dark"] .bpm-chip {
  background: var(--bb-sec-btn-bg);
  color: var(--text-color);
  border-color: var(--border-color);
}

[data-theme="dark"] .keybind-row {
  border-color: var(--border-color);
}

[data-theme="dark"] .file-upload-area {
  background: var(--dropdown-bg);
  border-color: var(--border-color);
}

[data-theme="dark"] .auth-content {
  background: var(--panel-bg);
  color: var(--text-color);
}

[data-theme="dark"] .auth-brand p,
[data-theme="dark"] .auth-mini-row,
[data-theme="dark"] .auth-status,
[data-theme="dark"] .online-cadence-group,
[data-theme="dark"] .online-cadence-admin-actions {
  color: rgba(255, 255, 255, 0.72);
}

[data-theme="dark"] .online-cadence-panel {
  background: var(--dropdown-bg);
  border-color: var(--border-color);
}

[data-theme="dark"] .online-cadence-card {
  background: var(--panel-bg);
  border-color: var(--border-color);
  color: var(--text-color);
}

[data-theme="dark"] .online-cadence-section-title {
  color: var(--text-color);
}

[data-theme="dark"] .online-cadence-section-title span {
  background: var(--panel-bg);
  border-color: var(--border-color);
  color: rgba(255, 255, 255, 0.72);
}

[data-theme="dark"] .online-cadence-header p,
[data-theme="dark"] .online-cadence-status,
[data-theme="dark"] .online-cadence-desc {
  color: rgba(255, 255, 255, 0.72);
}

[data-theme="dark"] .cadence-preview-block {
  border-color: rgba(255, 255, 255, 0.78);
}

[data-theme="dark"] .tap-mode-btn,
[data-theme="dark"] .tap-assessment-stats span {
  background: var(--panel-bg);
  border-color: var(--border-color);
  color: var(--text-color);
}

[data-theme="dark"] .tap-mode-btn.active,
[data-theme="dark"] .tap-mode-btn[aria-pressed="true"] {
  background: var(--text-color);
  border-color: var(--text-color);
  color: var(--panel-bg);
}

[data-theme="dark"] .tap-pad {
  background:
    linear-gradient(180deg, rgba(44, 44, 44, 0.96), rgba(28, 28, 28, 0.98)),
    var(--panel-bg);
  border-color: var(--border-color);
  color: var(--text-color);
  box-shadow: 0 8px 0 rgba(255, 255, 255, 0.22);
}

[data-theme="dark"] #tap-pad-sub,
[data-theme="dark"] .tap-assessment-stats small {
  color: rgba(255, 255, 255, 0.72);
}

[data-theme="dark"] .tap-stick {
  background: var(--text-color);
}

[data-theme="dark"] .bb-button.sec-btn {
  background: var(--bb-sec-btn-bg) !important;
  color: var(--text-color) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28) !important;
}

[data-theme="dark"] .bb-button.sec-btn.active {
  background: #f85c48 !important;
  color: #ffffff !important;
  border-color: #ff8d7f !important;
  box-shadow:
    0 0 0 1px rgba(255, 141, 127, 0.22),
    0 0 14px rgba(248, 92, 72, 0.35) !important;
  opacity: 1 !important;
  filter: none !important;
}

[data-theme="dark"] .bb-button.sec-btn.inactive,
[data-theme="dark"] .bb-button.sec-btn:not(.active) {
  background: #2f2f2f !important;
  color: #f3f3f3 !important;
  border-color: #5a5a5a !important;
  opacity: 1 !important;
  filter: none !important;
}

[data-theme="dark"] .bb-button.sec-btn:hover,
[data-theme="dark"] .bb-button.sec-btn:focus-visible {
  border-color: #7a7a7a !important;
}

[data-theme="dark"] #ad-banner-placeholder {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.7);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
}

[data-theme="dark"] .block-color-item {
  background: var(--dropdown-bg);
  border-color: var(--border-color);
}

[data-theme="dark"] .block-color-label {
  color: var(--text-color);
}

[data-theme="dark"] .block-color-swatch {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .keybind-input-wrapper {
  background: var(--dropdown-bg);
  border-color: var(--border-color);
}

[data-theme="dark"] .keybind-tag {
  background: #f85c48;
  color: #fff;
}

[data-theme="dark"] #add-keybind-btn {
  background: #f85c48;
  color: #fff;
}

/* ============================================
   LOOP BRACKET MARKERS
   ============================================ */
.loop-bracket {
  position: absolute;
  top: calc(var(--dice-size, 80px) * 0.04);
  bottom: calc(var(--dice-size, 80px) * 0.04);
  width: calc(var(--dice-size, 80px) * 0.18);
  min-width: 10px;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  z-index: 10000;
}

/* [ bracket — left side */
.loop-bracket.loop-start {
  left: calc(var(--dice-size, 80px) * -0);
  border-left: 5px solid #000;
  border-top: 5px solid #000;
  border-bottom: 5px solid #000;
  border-right: none;
  border-radius: 4px 0 0 4px;
}

/* ] bracket — right side */
.loop-bracket.loop-end {
  right: calc(var(--dice-size, 80px) * -0.01);
  left: auto;
  border-right: 5px solid #000;
  border-top: 5px solid #000;
  border-bottom: 5px solid #000;
  border-left: none;
  border-radius: 0 4px 4px 0;
}

/* Hide the old bar and dots — no longer needed */
.loop-bracket-bar,
.loop-bracket-dots,
.loop-bracket-dot {
  display: none;
}

/* Repeat count badge (on loop-end) */
.loop-repeat-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #000;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  z-index: 2001;
}

/* Bracket active state during playback */
.loop-bracket.loop-active {
  border-color: var(--face-3-color, #ffd000) !important;
}
.loop-bracket.loop-active .loop-repeat-badge {
  background: var(--face-3-color, #ffd000) !important;
  color: #000;
}

/* ── Color per loop ── */
.loop-bracket[data-loop-color="0"] {
  border-color: var(--face-1-color, #fb6354);
}
.loop-bracket[data-loop-color="0"] .loop-repeat-badge {
  background: var(--face-1-color, #fb6354);
}
.loop-bracket[data-loop-color="1"] {
  border-color: var(--face-2-color, #70b8fe);
}
.loop-bracket[data-loop-color="1"] .loop-repeat-badge {
  background: var(--face-2-color, #70b8fe);
}
.loop-bracket[data-loop-color="2"] {
  border-color: var(--face-3-color, #ffd000);
}
.loop-bracket[data-loop-color="2"] .loop-repeat-badge {
  background: var(--face-3-color, #ffd000);
  color: #000;
}
.loop-bracket[data-loop-color="3"] {
  border-color: var(--face-6-color, #7fe2c0);
}
.loop-bracket[data-loop-color="3"] .loop-repeat-badge {
  background: var(--face-6-color, #7fe2c0);
  color: #000;
}
.loop-bracket[data-loop-color="4"] {
  border-color: var(--face-5-color, #ffa84d);
}
.loop-bracket[data-loop-color="4"] .loop-repeat-badge {
  background: var(--face-5-color, #ffa84d);
  color: #000;
}
.loop-bracket[data-loop-color="5"] {
  border-color: var(--face-4-color, #c739ff);
}
.loop-bracket[data-loop-color="5"] .loop-repeat-badge {
  background: var(--face-4-color, #c739ff);
}

/* Dark mode adjustments */
[data-theme="dark"] .loop-bracket[data-loop-color="0"] {
  border-color: var(--face-1-color, #fb6354);
}
[data-theme="dark"] .loop-bracket[data-loop-color="1"] {
  border-color: var(--face-2-color, #70b8fe);
}
[data-theme="dark"] .loop-bracket[data-loop-color="2"] {
  border-color: var(--face-3-color, #ffd000);
}
[data-theme="dark"] .loop-bracket[data-loop-color="3"] {
  border-color: var(--face-6-color, #7fe2c0);
}
[data-theme="dark"] .loop-bracket[data-loop-color="4"] {
  border-color: var(--face-5-color, #ffa84d);
}
[data-theme="dark"] .loop-bracket[data-loop-color="5"] {
  border-color: var(--face-4-color, #c739ff);
}
/* Default (no color attr) dark mode */
[data-theme="dark"] .loop-bracket:not([data-loop-color]) {
  border-color: #fff;
}
[data-theme="dark"] .loop-repeat-badge:not([data-loop-color]) {
  background: #fff;
  color: #000;
}

/* ── Music Notation Mode: show repeat signs ── */
body.music-symbols-enabled .loop-bracket {
  border: none !important;
  border-radius: 0;
}

body.music-symbols-enabled .loop-bracket::before {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: calc(var(--dice-size, 80px) * 0.5);
  font-weight: 100;

  pointer-events: none;
}

body.music-symbols-enabled .loop-bracket.loop-start::before {
  content: "𝄆";
  left: 0;
  color: #000;
}

body.music-symbols-enabled .loop-bracket.loop-end::before {
  content: "𝄇";
  right: 0;
  left: auto;
  color: #000;
}

/* Color the repeat signs per loop */
body.music-symbols-enabled .loop-bracket[data-loop-color="0"]::before {
  color: var(--face-1-color, #fb6354);
}
body.music-symbols-enabled .loop-bracket[data-loop-color="1"]::before {
  color: var(--face-2-color, #70b8fe);
}
body.music-symbols-enabled .loop-bracket[data-loop-color="2"]::before {
  color: var(--face-3-color, #ffd000);
}
body.music-symbols-enabled .loop-bracket[data-loop-color="3"]::before {
  color: var(--face-6-color, #7fe2c0);
}
body.music-symbols-enabled .loop-bracket[data-loop-color="4"]::before {
  color: var(--face-5-color, #ffa84d);
}
body.music-symbols-enabled .loop-bracket[data-loop-color="5"]::before {
  color: var(--face-4-color, #c739ff);
}

/* Dark mode notation repeat signs */
[data-theme="dark"] body.music-symbols-enabled .loop-bracket.loop-start::before,
[data-theme="dark"] body.music-symbols-enabled .loop-bracket.loop-end::before {
  color: #fff;
}
[data-theme="dark"]
  body.music-symbols-enabled
  .loop-bracket[data-loop-color="0"]::before {
  color: var(--face-1-color, #fb6354);
}
[data-theme="dark"]
  body.music-symbols-enabled
  .loop-bracket[data-loop-color="1"]::before {
  color: var(--face-2-color, #70b8fe);
}
[data-theme="dark"]
  body.music-symbols-enabled
  .loop-bracket[data-loop-color="2"]::before {
  color: var(--face-3-color, #ffd000);
}
[data-theme="dark"]
  body.music-symbols-enabled
  .loop-bracket[data-loop-color="3"]::before {
  color: var(--face-6-color, #7fe2c0);
}
[data-theme="dark"]
  body.music-symbols-enabled
  .loop-bracket[data-loop-color="4"]::before {
  color: var(--face-5-color, #ffa84d);
}
[data-theme="dark"]
  body.music-symbols-enabled
  .loop-bracket[data-loop-color="5"]::before {
  color: var(--face-4-color, #c739ff);
}

/* Loop sidebar controls */
.loop-sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem 0;
}

.loop-repeat-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.loop-repeat-control label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}

.loop-repeat-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #e0e0e0;
}

.loop-repeat-stepper button {
  width: 36px;
  height: 36px;
  border: none;
  background: #f5f5f5;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
  color: #333;
}

.loop-repeat-stepper button:active {
  background: #e0e0e0;
}

.loop-repeat-stepper .loop-repeat-value {
  width: 40px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  background: transparent;
  color: #333;
  pointer-events: none;
}

.loop-delete-btn {
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: 2px solid #ff4d4d;
  background: transparent;
  color: #ff4d4d;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.loop-delete-btn:active {
  background: #ff4d4d;
  color: #fff;
}

/* Dark mode overrides for loops */
[data-theme="dark"] .loop-repeat-stepper {
  border-color: var(--border-color);
}

[data-theme="dark"] .loop-repeat-stepper button {
  background: var(--dropdown-bg);
  color: var(--text-color);
}

[data-theme="dark"] .loop-repeat-stepper button:active {
  background: var(--border-color);
}

[data-theme="dark"] .loop-repeat-stepper .loop-repeat-value {
  color: var(--text-color);
}

[data-theme="dark"] .loop-repeat-control label {
  color: var(--text-color);
}

/* Loop toggle button in sidebar */
.loop-controls-section {
  width: 100%;
  margin-top: 0.25rem;
}

.loop-toggle-btn {
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: 2px solid var(--face-1-color, #fb6354);
  background: transparent;
  color: var(--face-1-color, #fb6354);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.loop-toggle-btn:active {
  background: var(--face-1-color, #fb6354);
  color: #fff;
}

[data-theme="dark"] .loop-toggle-btn {
  border-color: var(--face-1-color, #fb6354);
  color: var(--face-1-color, #fb6354);
}

[data-theme="dark"] .loop-toggle-btn:active {
  background: var(--face-1-color, #fb6354);
  color: #fff;
}

[data-theme="dark"] .loop-delete-btn {
  border-color: #ff6b6b;
  color: #ff6b6b;
}

[data-theme="dark"] .loop-delete-btn:active {
  background: #ff6b6b;
  color: #fff;
}

/* ============================================
   ABOUT MODAL CREDITS
   ============================================ */
.about-credits-wrapper {
  margin-top: 1.5rem;
  text-align: left;
  max-height: 55vh;
  overflow-y: auto;
  padding-right: 8px;
}

.about-credits-wrapper::-webkit-scrollbar {
  width: 6px;
}
.about-credits-wrapper::-webkit-scrollbar-track {
  background: transparent;
}
.about-credits-wrapper::-webkit-scrollbar-thumb {
  background: var(--primary-color, #fb6354);
  border-radius: 4px;
}

.credits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin-top: 1rem;
}

@media (min-width: 500px) {
  .credits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.credit-card {
  background: var(--surface-color, #f9f9f9);
  border: 1px solid var(--border-color, #eaeaea);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="dark"] .credit-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .about-credits-wrapper h4 {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.credit-category {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-color, #fb6354);
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.credit-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-color, #333);
}

.credit-author {
  font-size: 0.85rem;
  color: var(--text-muted, #777);
  font-weight: 500;
}

.credit-link {
  font-size: 0.8rem;
  color: var(--primary-color, #fb6354);
  opacity: 0.9;
  text-decoration: none;
  margin-top: 0.4rem;
  word-break: break-all;
  font-weight: 600;
}

span.credit-link {
  color: var(--text-muted, #888);
}

/* ============================================
   SMALL DEVICE FONT SIZE
   ============================================ */
@media (max-width: 430px) {
  * {
  }
}

/* ============================================
   BLOCK SELECTOR MODAL & TRIGGER
   ============================================ */
.block-selector-trigger {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  gap: 12px;
  padding: 14px 16px;
  min-height: 64px;
  background: var(--bg-color, #fff);
  border: 2px solid #ddd;
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

[data-theme="dark"] .block-selector-trigger {
  background: #333;
  border-color: #555;
}

.block-selector-trigger:hover {
  border-color: #fb6354;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.block-selector-trigger .dice-preview {
  flex: 0 0 auto;
  min-width: 84px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.block-selector-trigger .combo-arrow {
  color: #888;
  font-size: 1.2rem;
}

.block-selector-current-name {
  flex: 1;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-color, #222);
  text-align: left;
}

/* ============================================
   BLOCK SELECTOR MODAL & TRIGGER
   ============================================ */
/* Modal Grid Container */
.block-selection-modal {
  z-index: 5000;
  justify-content: center;
  align-items: center;
  padding: 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.block-selection-modal-content {
  width: min(560px, 100%);
  max-width: 560px;
  height: auto;
  max-height: min(88dvh, 760px);
  background: var(--bg-color, #fff);
  border-radius: 28px !important;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(0, 0, 0, 0.06);
  animation: modalPop 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.block-selection-modal-header {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.block-selection-modal-header h2 {
  font-size: clamp(1.15rem, 1rem + 0.9vw, 1.55rem);
}

.block-selection-grid {
  display: flex !important;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  padding: 0 20px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.block-section-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.block-section-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #fb6354;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  padding-bottom: 8px;
}

[data-theme="dark"] .block-section-title {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.block-selection-grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 14px;
  width: 100%;
}

.block-selection-grid-inner.block-selection-grid-holds {
  grid-template-columns: 1fr;
}

.block-selection-btn {
  background: rgba(0, 0, 0, 0.03);
  border: 2px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
  min-height: 128px;
  min-width: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.block-selection-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.block-selection-btn:active {
  transform: scale(0.98);
}

.block-selection-btn:focus-visible {
  outline: none;
  border-color: rgba(251, 99, 84, 0.8);
  box-shadow: 0 0 0 4px rgba(251, 99, 84, 0.18);
}

[data-theme="dark"] .block-selection-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.block-selection-btn.active {
  border-color: #fb6354;
  background: rgba(251, 99, 84, 0.12);
  box-shadow: 0 10px 18px rgba(251, 99, 84, 0.14);
}

.block-selection-btn .dice-preview {
  margin: 0 !important;
  padding: 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 96px;
  overflow: visible;
}

.block-selection-grid-holds .block-selection-btn {
  min-height: 118px;
}

.block-selection-grid-holds .block-selection-btn .dice-preview {
  height: 88px;
}

.block-selection-btn[hidden] {
  display: none !important;
}

[data-theme="dark"] .block-selection-modal-content {
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .block-selection-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
  .block-selection-modal {
    align-items: flex-end;
    padding: 0;
  }

  .block-selection-modal-content {
    width: 100%;
    max-width: none;
    max-height: min(92dvh, 100dvh);
    border-radius: 26px 26px 0 0 !important;
    animation: blockSelectionSheetIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .block-selection-modal-header {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .block-selection-grid {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  .block-selection-grid-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .block-selection-btn .dice-preview {
    height: 84px;
  }
}

@media (max-width: 820px) {
.theory-drill-card.is-linear,
.theory-drill-card.is-arcade {
  grid-template-columns: minmax(0, 1fr);
}

.theory-drill-card.is-arcade-list {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(38, 18, 14, 0.14);
  min-height: 132px;
  padding: 1.25rem 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 0.8rem;
  align-items: center;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.theory-drill-card.is-arcade-list .theory-drill-card-copy {
  display: grid;
  gap: 0.42rem;
}

.theory-drill-order {
  font-size: 0.82rem;
  font-style: italic;
  color: #8a7570;
}

.theory-drill-card.is-arcade-list strong {
  font-size: 1rem;
  line-height: 1.12;
  font-weight: 500;
  color: #231917;
}

.theory-drill-card.is-arcade-list small,
.theory-drill-card.is-arcade-list em {
  color: #8a7570;
  font-size: 0.82rem;
  font-style: normal;
}

.theory-drill-card-watermark {
  justify-self: end;
  width: 128px;
  max-width: 100%;
  opacity: 0.12;
  filter: grayscale(1);
}

  .theory-drill-row-action {
    justify-self: stretch;
  }

  .theory-root-shell.is-screen .theory-content-panel {
    padding: 0.8rem;
  }

  .theory-feature-hero-art-wide {
    height: 180px;
  }
}

.theory-continue-screen {
  display: grid;
  gap: 1rem;
}

.theory-continue-hero {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  min-height: 240px;
  background: #1f1b18;
}

.theory-continue-hero-art {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  filter: saturate(0.92);
}

.theory-continue-hero-copy {
  position: absolute;
  left: 2rem;
  right: 2rem;
  bottom: 1.5rem;
  display: grid;
  gap: 0.12rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.theory-continue-hero-copy span {
  font-size: 1rem;
  font-weight: 500;
}

.theory-continue-hero-copy strong {
  font-size: 2.3rem;
  line-height: 1;
  font-weight: 600;
}

.theory-continue-list {
  display: grid;
  gap: 0.85rem;
}

.theory-continue-card {
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(38, 18, 14, 0.14);
  min-height: 180px;
  padding: 1.35rem 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  gap: 0.75rem;
  align-items: center;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.theory-continue-card-copy {
  display: grid;
  gap: 0.35rem;
}

.theory-continue-kicker {
  font-size: 0.88rem;
  font-style: italic;
  color: #9a938f;
}

.theory-continue-card strong {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  line-height: 1.04;
  font-weight: 400;
  color: #342d2a;
}

.theory-continue-card small {
  font-size: 0.88rem;
  color: #8f8783;
}

.theory-continue-meta {
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: #9a938f;
}

.theory-continue-stars {
  letter-spacing: 0.04em;
  font-size: 1rem;
}

.theory-continue-meta em {
  font-style: italic;
  font-size: 0.95rem;
  color: #908783;
}

.theory-continue-card-watermark {
  justify-self: end;
  width: 160px;
  max-width: 100%;
  opacity: 0.1;
  filter: grayscale(1);
}

@media (max-width: 820px) {
  .theory-continue-hero,
  .theory-continue-hero-art {
    min-height: 184px;
    height: 184px;
  }

  .theory-continue-hero-copy {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  .theory-continue-hero-copy strong {
    font-size: 1.9rem;
  }

  .theory-continue-card {
    grid-template-columns: minmax(0, 1fr) 112px;
    min-height: 148px;
    padding: 1rem;
  }

  .theory-continue-card strong {
    font-size: 1.1rem;
  }

  .theory-continue-card-watermark {
    width: 104px;
  }

  .theory-continue-meta {
    gap: 0.7rem;
    flex-wrap: wrap;
  }
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] {
  --line-color: rgba(110, 246, 255, 0.92);
  --cyan-dim: rgba(122, 238, 255, 0.58);
  --perfect-fill: rgba(90, 235, 140, 0.2);
  --perfect-border: rgba(122, 255, 168, 0.9);
  --cursor-red: rgba(255, 104, 104, 0.98);
  gap: 0.35rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"],
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] *,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] *::before,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .timeline-area {
  position: relative;
  width: 100%;
  height: 74px;
  align-self: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .timeline-container {
  position: static;
  display: contents;
  min-height: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .timeline-line {
  position: absolute;
  left: 52px;
  right: 52px;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--line-color) 8%,
    var(--line-color) 92%,
    transparent 100%
  );
  box-shadow: 0 0 14px rgba(96, 241, 255, 0.18);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .indicator-early,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .indicator-late {
  position: absolute;
  top: 50%;
  width: auto;
  height: auto;
  transform: translateY(-50%);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: block;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
  z-index: 3;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .indicator-early {
  left: 10px;
  color: #ffd869;
  text-shadow: 0 0 12px rgba(255, 216, 105, 0.28);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .indicator-late {
  right: 10px;
  color: #ff8c8c;
  text-shadow: 0 0 12px rgba(255, 140, 140, 0.24);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .perfect-zone {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(128px, 15vw, 178px);
  height: 34px;
  transform: translate(-50%, -50%);
  border-radius: 12px;
  background: var(--perfect-fill);
  border: 2px solid var(--perfect-border);
  display: grid;
  place-items: center;
  box-shadow: none;
  z-index: 3;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .perfect-zone::before {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(187, 255, 207, 0.92) 10%,
    rgba(187, 255, 207, 0.92) 90%,
    transparent 100%
  );
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .perfect-label {
  position: relative;
  z-index: 1;
  color: #effff2;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .cursor-line {
  position: absolute;
  top: 16px;
  height: 42px;
  width: 4px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 150, 150, 0.96), var(--cursor-red), rgba(217, 42, 42, 0.96));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.82), 0 0 16px rgba(255, 92, 92, 0.35);
  z-index: 4;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.25rem;
  align-items: start;
  justify-items: center;
  margin-top: 0.1rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row > button {
  appearance: none;
  border: 0;
  background: transparent;
  display: grid;
  justify-items: center;
  gap: 0.14rem;
  color: var(--text-main);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row > button::before {
  display: none;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row .beat-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--cyan-dim);
  background: transparent;
  box-shadow: none;
  display: grid;
  place-items: center;
  gap: 0.02rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row .beat-circle svg {
  width: 10px;
  height: 10px;
  color: #eefcff;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row .beat-circle strong {
  font-size: 0.52rem;
  line-height: 1;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row > button span {
  font-size: 0.42rem;
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(156, 238, 255, 0.9);
}

:root {
  --bg-color: #faf8f5;
  --text-color: #2c2523;
  --brand-primary: #ff523d;
  --block-inactive-color: #e5e0dc;
  --panel-bg: #ffffff;
}

#container-bg {
  background: var(--panel-bg);
  color: var(--text-color);
  border: 1px solid rgba(43, 31, 28, 0.08);
  box-shadow: 0 12px 35px rgba(76, 37, 31, 0.05);
}

.ghost-metronome-screen-root[data-ghost-exercise="exercise-2"] {
  background: var(--bg-color) !important;
  color: var(--text-color) !important;
}

.ghost-metronome-screen-root[data-ghost-exercise="exercise-2"] * {
  --text-main: var(--text-color);
  --text-soft: rgba(44, 37, 35, 0.72);
  --cyan-soft: rgba(0, 216, 108, 0.12);
  --cyan-dim: rgba(124, 101, 92, 0.22);
  --line-color: rgba(94, 69, 62, 0.48);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] {
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  gap: 1.15rem;
  width: min(760px, 100%);
  min-height: 100dvh;
  padding: clamp(1rem, 3vw, 1.75rem);
  background: transparent !important;
  color: var(--text-color) !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-header,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-status,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-track-shell,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-controls,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .exercise2-inline-hud,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-scoreboard {
  background: transparent !important;
  color: var(--text-color) !important;
  border-color: rgba(43, 31, 28, 0.08) !important;
  box-shadow: none !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-header {
  margin-bottom: 0.15rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-header h3,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-header .ghost-metronome-title {
  color: var(--text-color) !important;
  text-shadow: none !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .timeline-area {
  width: 100%;
  padding: 0.65rem 0 0.85rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .timeline-line {
  height: 6px !important;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(94, 69, 62, 0.18) 0%, rgba(94, 69, 62, 0.72) 14%, rgba(94, 69, 62, 0.72) 86%, rgba(94, 69, 62, 0.18) 100%) !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .perfect-zone {
  min-height: 34px;
  border: 2px solid #00b359 !important;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(0, 216, 108, 0.1) 0%, rgba(0, 179, 89, 0.16) 100%) !important;
  box-shadow: 0 10px 24px rgba(0, 179, 89, 0.16) !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .perfect-label {
  color: var(--text-color) !important;
  text-shadow: none !important;
  font-weight: 800;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .indicator-early,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .indicator-late {
  color: #6e5751 !important;
  text-shadow: none !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .indicator-late {
  color: var(--brand-primary) !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] #cursorLine,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .cursor-line {
  background: linear-gradient(180deg, #ff8e78 0%, #ff523d 100%) !important;
  box-shadow: 0 0 12px rgba(255, 82, 61, 0.22) !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row {
  width: 100%;
  margin-top: 0.35rem;
  margin-bottom: 0.2rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row > button {
  color: var(--text-color) !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row .beat-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1.5px solid rgba(124, 101, 92, 0.28) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 238, 233, 0.98) 100%) !important;
  color: var(--text-color) !important;
  box-shadow: 0 10px 18px rgba(76, 37, 31, 0.08);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row .beat-circle svg {
  color: #8b726b !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row .beat-circle strong {
  font-size: 0.74rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .beats-row > button span {
  color: rgba(44, 37, 35, 0.62) !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-start-btn,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .ghost-metronome-challenge-btn {
  background: linear-gradient(135deg, #ff6b54 0%, #ff523d 100%) !important;
  color: #fff !important;
  border-color: rgba(255, 82, 61, 0.22) !important;
  box-shadow: 0 16px 28px rgba(255, 82, 61, 0.2) !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] #touchPad {
  position: sticky;
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  align-self: stretch;
  width: 100%;
  min-height: 104px;
  height: clamp(104px, 15vh, 118px);
  margin-top: auto;
  padding: 0.95rem 1rem;
  border-radius: 26px;
  border: 1px solid rgba(43, 31, 28, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f7f2ed 100%) !important;
  color: var(--text-color) !important;
  box-shadow: 0 18px 36px rgba(76, 37, 31, 0.1) !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] #touchPad strong,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] #touchPad span {
  color: inherit !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .indicator-early.is-flashing,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .indicator-late.is-flashing {
  animation: indicatorPop 360ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ghost-metronome-screen-root[data-ghost-exercise="exercise-1"] {
  --bg-color: #faf8f5;
  --panel-bg: #ffffff;
  --text-color: #2c2523;
  --brand-primary: #ff523d;
  --block-inactive-color: #e5e0dc;
  --success: #2ecc71;
  --warning: #f7b731;
  --danger: #eb5757;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] {
  background: linear-gradient(180deg, #fffdf9 0%, var(--bg-color) 100%);
  color: var(--text-color);
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  padding: 8px 16px 10px;
  gap: 4px;
  overflow: hidden;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading {
  text-align: center;
  align-items: center;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading label {
  color: var(--brand-primary);
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading h3 {
  color: var(--text-color);
  font-size: clamp(1.42rem, 2.6vw, 1.95rem);
  text-transform: uppercase;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading p {
  max-width: 760px;
  color: rgba(44, 37, 35, 0.72);
  font-size: 0.72rem;
  line-height: 1.12;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress {
  display: grid;
  gap: 4px;
  align-items: start;
  padding: 0 4px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-step::after {
  content: "";
  position: absolute;
  top: 14px;
  left: calc(50% + 15px);
  width: calc(100% - 12px);
  height: 3px;
  border-radius: 999px;
  background: rgba(229, 224, 220, 0.9);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-step:last-child::after {
  display: none;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-dot {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--block-inactive-color);
  border: 2px solid rgba(44, 37, 35, 0.08);
  box-shadow: 0 6px 16px rgba(76, 37, 31, 0.08);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-step strong {
  font-size: 0.76rem;
  color: rgba(44, 37, 35, 0.65);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-step.is-audible .ghost-ex1-progress-dot,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-step.is-filled .ghost-ex1-progress-dot {
  background: linear-gradient(135deg, #ff7f6d 0%, var(--brand-primary) 100%);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-step.is-audible::after {
  background: rgba(255, 82, 61, 0.45);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-step.is-active .ghost-ex1-progress-dot {
  transform: scale(1.08);
  box-shadow: 0 0 0 8px rgba(255, 82, 61, 0.14), 0 16px 30px rgba(255, 82, 61, 0.28);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-shell {
  display: grid;
  grid-template-columns: 96px minmax(210px, 282px) 96px;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub {
  width: min(100%, 360px);
  min-height: 132px;
  border-radius: 28px;
  background: radial-gradient(circle at top, #fffdfb 0%, var(--panel-bg) 58%, #f8f2ec 100%);
  border: 1px solid rgba(44, 37, 35, 0.08);
  box-shadow: 0 24px 50px rgba(76, 37, 31, 0.08);
  padding: 10px 14px;
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard {
  width: 148px;
  min-height: 106px;
  border-radius: 24px;
  border: 2px solid rgba(44, 37, 35, 0.08);
  background: linear-gradient(180deg, #fffefc 0%, #f5efe9 100%);
  box-shadow: 0 20px 34px rgba(76, 37, 31, 0.1);
  padding: 12px 14px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  text-align: center;
  place-self: center;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-kicker {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(44, 37, 35, 0.58);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard strong {
  font-size: 1.7rem;
  line-height: 1;
  color: var(--text-color);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-sub {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(44, 37, 35, 0.72);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-kicker {
  font-size: 0.74rem;
  color: rgba(44, 37, 35, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub strong {
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1;
  color: var(--brand-primary);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub #ghost-metronome-combo-sub {
  font-size: 0.78rem;
  color: rgba(44, 37, 35, 0.7);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-footer {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle {
  position: relative;
  isolation: isolate;
  width: min(100%, 238px);
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(44, 37, 35, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(255,247,243,0.92) 100%);
  color: var(--text-color);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 4px;
  box-shadow: 0 12px 24px rgba(76, 37, 31, 0.08);
  overflow: visible;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle-pill {
  position: absolute;
  inset: 4px auto 4px 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7f6d 0%, var(--brand-primary) 100%);
  box-shadow: 0 12px 20px rgba(255, 82, 61, 0.24);
  transition: transform 220ms cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 220ms ease;
  z-index: 0;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle[data-mode="challenge"] .ghost-ex1-mode-toggle-pill {
  transform: translateX(100%);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle-option,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle-badge {
  position: relative;
  z-index: 1;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  font-size: 0.82rem;
  font-weight: 900;
  color: rgba(44, 37, 35, 0.7);
  transition: color 180ms ease;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle[data-mode="free"] .ghost-ex1-mode-toggle-option.is-free,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle[data-mode="challenge"] .ghost-ex1-mode-toggle-option.is-challenge {
  color: #fff;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle-badge {
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translate(-50%, 55%);
  min-height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe6b8 0%, #ffd79c 100%);
  color: #b56400;
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 10px 18px rgba(255, 179, 72, 0.18);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle.is-live .ghost-ex1-mode-toggle-pill,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle.is-countdown .ghost-ex1-mode-toggle-pill {
  animation: ghostExercise1Pulse 900ms ease-in-out infinite;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-stars {
  color: var(--warning);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-grid {
  display: grid;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  grid-auto-rows: minmax(88px, auto);
  gap: 10px 12px;
  align-content: start;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad {
  width: 100%;
  min-height: 88px;
  padding: 10px 10px 8px;
  border-radius: 20px;
  background: var(--panel-bg);
  border: 1px solid rgba(44, 37, 35, 0.08);
  box-shadow: 0 16px 34px rgba(76, 37, 31, 0.07);
  display: grid;
  justify-items: center;
  align-content: space-between;
  gap: 6px;
  position: relative;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-face {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  gap: 2px;
  background: #fff6f1;
  color: var(--brand-primary);
  border: 1px solid rgba(44, 37, 35, 0.08);
  box-shadow: inset 0 -10px 24px rgba(255, 82, 61, 0.08);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-icon {
  font-size: 1.45rem;
  line-height: 1;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-face strong {
  font-size: 0.92rem;
  color: var(--text-color);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: rgba(44, 37, 35, 0.72);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-now {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(255, 82, 61, 0.12);
  color: var(--brand-primary);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad.is-audible {
  background: linear-gradient(180deg, #ff8f7a 0%, #ff735e 48%, var(--brand-primary) 100%);
  border-color: rgba(255, 82, 61, 0.22);
  box-shadow: 0 20px 36px rgba(255, 82, 61, 0.18);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad.is-audible .ghost-ex1-pad-face {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 -10px 20px rgba(255, 82, 61, 0.08);
  color: var(--brand-primary);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad.is-audible .ghost-ex1-pad-face strong,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad.is-audible .ghost-ex1-pad-face {
  color: var(--brand-primary);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad.is-audible .ghost-ex1-pad-label {
  color: #fff;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad.is-ghost {
  background: linear-gradient(180deg, #f2ece6 0%, #e8e0d8 100%);
  border-color: rgba(44, 37, 35, 0.08);
  box-shadow: 0 14px 26px rgba(76, 37, 31, 0.08);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad.is-ghost .ghost-ex1-pad-face {
  background: rgba(255, 255, 255, 0.52);
  color: #8f827b;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad.is-filled.is-audible .ghost-ex1-pad-face {
  background: linear-gradient(135deg, #ff7f6d 0%, var(--brand-primary) 100%);
  color: #fff;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad.is-filled.is-audible .ghost-ex1-pad-face strong {
  color: #fff;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad.is-active {
  transform: scale(1.08);
  border-color: rgba(255, 82, 61, 0.28);
  box-shadow: 0 0 0 8px rgba(255, 82, 61, 0.12), 0 26px 50px rgba(255, 82, 61, 0.18);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad.is-active .ghost-ex1-pad-now {
  opacity: 1;
  transform: translateY(0);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-controls {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 8px;
  align-items: end;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-shell,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status {
  background: var(--panel-bg);
  border: 1px solid rgba(44, 37, 35, 0.08);
  box-shadow: 0 14px 30px rgba(76, 37, 31, 0.06);
  border-radius: 24px;
  padding: 10px 12px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-meter {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-track {
  min-height: 18px;
  background: linear-gradient(90deg, rgba(235, 87, 87, 0.18) 0%, rgba(255,255,255,1) 50%, rgba(247, 183, 49, 0.2) 100%);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-arrow {
  font-size: 1.1rem;
  font-weight: 800;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-arrow.is-left {
  color: var(--danger);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-arrow.is-right {
  color: var(--warning);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-labels {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-label.is-left {
  color: var(--danger);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-label.is-center {
  color: var(--success);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-label.is-right {
  color: var(--warning);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status strong {
  color: var(--text-color);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status span {
  color: rgba(44, 37, 35, 0.72);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-footer {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "controls"
    "start"
    "touchpad";
  justify-items: center;
  align-items: center;
  gap: 8px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-start-btn {
  grid-area: start;
  justify-self: center;
  width: min(100%, 320px);
  min-height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff7f6d 0%, var(--brand-primary) 100%);
  box-shadow: 0 18px 36px rgba(255, 82, 61, 0.24);
  font-size: 0.96rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad {
  grid-area: touchpad;
  justify-self: center;
  align-self: center;
  width: 200px;
  height: 200px;
  border-radius: 999px;
  background: var(--panel-bg);
  border: 5px solid rgba(255, 82, 61, 0.9);
  color: var(--text-color);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.92),
    0 0 0 8px rgba(255, 82, 61, 0.18),
    0 24px 42px rgba(76, 37, 31, 0.12);
  display: grid;
  place-content: center;
  gap: 6px;
  text-align: center;
  padding: 16px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad strong {
  font-size: 1.04rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad span {
  font-size: 0.88rem;
  line-height: 1.22;
  color: rgba(44, 37, 35, 0.74);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-controls {
  grid-area: controls;
  width: 100%;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] #touchPad.is-flashing {
  animation: elasticPop 360ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 0 12px rgba(255, 82, 61, 0.12), 0 26px 44px rgba(255, 82, 61, 0.22);
}

@media (max-width: 768px) {
  .cadence-library-sheet {
    width: 100vw;
    max-width: 100vw;
    max-height: min(88dvh, 100dvh);
    border-radius: 22px 22px 0 0;
  }

  .cadence-library-sheet .online-cadence-panel {
    padding: 0.8rem 0.8rem calc(1rem + env(safe-area-inset-bottom, 0px));
    gap: 0.7rem;
  }

  .online-cadence-header {
    flex-direction: column;
    gap: 0.7rem;
  }

  .online-cadence-header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .online-cadence-list {
    gap: 0.7rem;
    padding-right: 0;
  }

  .online-library-folder {
    display: block;
    overflow: visible;
  }

  .online-library-folder-summary {
    padding: 0.82rem 0.85rem;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .online-library-folder-main {
    flex: 1 1 auto;
  }

  .online-library-folder-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    flex-basis: 36px;
  }

  .online-library-folder-copy strong {
    font-size: 0.9rem;
  }

  .online-library-folder-copy span {
    font-size: 0.68rem;
  }

  .online-library-folder-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.3rem 0.65rem 0.7rem;
  }

  .online-library-folder-actions {
    gap: 0.45rem;
    justify-content: flex-end;
    padding-top: 0.2rem;
  }

  .online-library-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 0.72rem 0.76rem;
    gap: 0.55rem;
  }

  .online-library-item-copy {
    flex: 1 1 auto;
    min-width: 0;
  }

  .online-library-item-instrument {
    font-size: 0.88rem;
  }
}

/* Exercise 1 premium pass - closer to redesign mock */
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading-ornaments {
  position: absolute;
  left: 50%;
  top: 2px;
  transform: translateX(-238px);
  display: flex;
  gap: 12px;
  pointer-events: none;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading-note,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading-star {
  font-size: 2rem;
  line-height: 1;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading-note {
  color: #ff6b54;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading-star {
  color: #d4bfb5;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7f6d 0%, var(--brand-primary) 100%);
  color: #fff;
  box-shadow: 0 10px 18px rgba(255, 82, 61, 0.18);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading h3 {
  font-size: clamp(1.92rem, 4vw, 2.95rem);
  line-height: 1.02;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading p {
  max-width: 720px;
  font-size: 0.92rem;
  line-height: 1.22;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-shell {
  border-radius: 28px;
  border: 1px solid rgba(44, 37, 35, 0.08);
  background: linear-gradient(180deg, #fffefc 0%, #fbf5ef 100%);
  box-shadow: 0 14px 28px rgba(76, 37, 31, 0.07);
  padding: 16px 20px 12px;
  display: grid;
  gap: 10px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-title {
  font-size: 0.96rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-title.is-audible {
  color: #167a37;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-title.is-ghost {
  color: #6e6661;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress {
  padding: 0 8px 0 0;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-dot {
  width: 34px;
  height: 34px;
  position: relative;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-step strong {
  font-size: 0.84rem;
  font-weight: 900;
  color: rgba(44, 37, 35, 0.85);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-step.is-audible .ghost-ex1-progress-dot::before,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-step.is-filled .ghost-ex1-progress-dot::before {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-step.is-active .ghost-ex1-progress-dot {
  transform: scale(1.24);
  box-shadow: 0 0 0 6px rgba(255, 165, 151, 0.3), 0 0 0 11px rgba(255, 82, 61, 0.12), 0 14px 24px rgba(255, 82, 61, 0.24);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard {
  width: 104px;
  min-height: 110px;
  padding: 8px 8px 6px;
  border-radius: 24px;
  box-shadow: 0 14px 28px rgba(76, 37, 31, 0.08);
  align-self: center;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-icon {
  font-size: 2rem;
  line-height: 1;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub {
  width: min(100%, 300px);
  min-height: auto;
  border-radius: 0;
  padding: 0;
  gap: 3px;
  position: relative;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-kicker {
  font-size: 0.92rem;
  color: rgba(44, 37, 35, 0.92);
  font-weight: 900;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub strong {
  font-size: clamp(2.25rem, 4.4vw, 3rem);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub #ghost-metronome-combo-sub {
  font-size: 0.82rem;
  font-weight: 800;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-burst {
  display: none;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-praise {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe6b8 0%, #ffd79c 100%);
  color: #b56400;
  font-weight: 900;
  font-size: 0.8rem;
  box-shadow: 0 8px 16px rgba(255, 179, 72, 0.16);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-ring {
  width: 100%;
  max-width: 236px;
  min-height: 110px;
  border-radius: 999px 999px 20px 20px;
  border: 4px solid rgba(255, 82, 61, 0.8);
  box-shadow: inset 0 0 0 9px rgba(255,255,255,0.88), 0 0 0 12px rgba(255, 82, 61, 0.08);
  display: grid;
  justify-items: center;
  align-content: start;
  padding: 10px 14px 10px;
  gap: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(255,248,244,0.94) 100%);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-ring-icon {
  font-size: 1.28rem;
  color: var(--brand-primary);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-mode-wrap {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-mode-title {
  font-size: 1.16rem;
  font-weight: 900;
  color: var(--text-color);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-waveform {
  display: flex;
  align-items: end;
  gap: 3px;
  min-height: 14px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-waveform span {
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff8d73 0%, var(--brand-primary) 100%);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-waveform span:nth-child(1),
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-waveform span:nth-child(9) { height: 6px; }
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-waveform span:nth-child(2),
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-waveform span:nth-child(8) { height: 10px; }
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-waveform span:nth-child(3),
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-waveform span:nth-child(7) { height: 16px; }
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-waveform span:nth-child(4),
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-waveform span:nth-child(6) { height: 12px; }
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-waveform span:nth-child(5) { height: 20px; }

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-grid {
  gap: 10px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad {
  min-height: 138px;
  padding: 10px 10px 8px;
  border-radius: 22px;
  gap: 6px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-face {
  width: 64px;
  height: 64px;
  border-radius: 18px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-icon {
  font-size: 1.85rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-face strong {
  font-size: 0.96rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-label {
  font-size: 0.78rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 8px 14px rgba(76, 37, 31, 0.08);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-now {
  top: -12px;
  right: 50%;
  padding: 5px 12px;
  background: linear-gradient(135deg, #ff7f6d 0%, var(--brand-primary) 100%);
  color: #fff;
  box-shadow: 0 10px 18px rgba(255, 82, 61, 0.22);
  transform: translate(50%, -6px);
  z-index: 2;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad.is-active {
  transform: translateY(-2px) scale(1.03);
  border-color: rgba(255, 82, 61, 0.34);
  box-shadow: 0 0 0 6px rgba(255, 82, 61, 0.12), 0 24px 34px rgba(255, 82, 61, 0.24);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad.is-active .ghost-ex1-pad-face {
  box-shadow: inset 0 -10px 20px rgba(255, 82, 61, 0.1), 0 0 0 4px rgba(255, 255, 255, 0.65), 0 0 0 10px rgba(255, 82, 61, 0.14);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad.is-active .ghost-ex1-pad-now {
  transform: translate(50%, 0);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 14px;
  box-shadow: 0 10px 20px rgba(76, 37, 31, 0.05);
  margin-top: 4px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar strong::before {
  content: "💡";
  margin-right: 8px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bottom-panel {
  width: 100%;
  border-radius: 30px;
  border: 1px solid rgba(44, 37, 35, 0.08);
  background: linear-gradient(180deg, #fffefc 0%, #faf5ef 100%);
  box-shadow: 0 18px 34px rgba(76, 37, 31, 0.07);
  padding: 14px 14px 12px;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 190px minmax(170px, 1fr);
  grid-template-areas: "precision touch helper";
  align-items: center;
  gap: 10px 12px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-controls {
  grid-area: precision;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad {
  grid-area: touch;
  width: 188px;
  height: 188px;
  justify-self: center;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.92),
    0 0 0 8px rgba(255, 82, 61, 0.18),
    0 0 0 14px rgba(255, 82, 61, 0.08),
    0 20px 34px rgba(76, 37, 31, 0.1);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad-icon {
  font-size: 2.2rem;
  line-height: 1;
  color: var(--brand-primary);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad strong {
  font-size: 1.12rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad-caption {
  font-size: 0.78rem;
  color: rgba(44, 37, 35, 0.7);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card {
  grid-area: helper;
  min-height: 172px;
  border-radius: 24px;
  border: 1px solid rgba(44, 37, 35, 0.08);
  background: rgba(255,255,255,0.78);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.8);
  padding: 12px 12px 10px;
  display: grid;
  align-content: start;
  gap: 8px;
  justify-self: stretch;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card strong {
  font-size: 0.96rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card span {
  font-size: 0.78rem;
  line-height: 1.16;
  color: rgba(44, 37, 35, 0.74);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-ghost {
  justify-self: end;
  align-self: end;
  font-size: 2.8rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-start-btn {
  width: min(100%, 400px);
  min-height: 56px;
  border-radius: 999px;
  font-size: 1.02rem;
  box-shadow: 0 14px 24px rgba(255, 82, 61, 0.18);
  margin-top: 8px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-2"] .perfect-zone.is-flashing,
.ghost-metronome-screen[data-ghost-exercise="exercise-2"] #touchPad.is-flashing {
  animation: elasticPop 360ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-label {
  transition: color 180ms ease, text-shadow 180ms ease, transform 180ms ease;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-start-btn,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard--bpm {
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease, border-color 180ms ease;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard--bpm {
  cursor: pointer;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard--bpm:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 82, 61, 0.2);
  box-shadow: 0 18px 30px rgba(255, 82, 61, 0.12);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard--bpm.is-live {
  border-color: rgba(255, 82, 61, 0.24);
  box-shadow: 0 18px 30px rgba(255, 82, 61, 0.12);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard--bpm strong::after {
  content: "▼";
  display: block;
  font-size: 0.7rem;
  line-height: 1;
  color: rgba(44, 37, 35, 0.45);
  margin-top: 4px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pressable.is-pressing,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-metronome-back.is-pressing,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-metronome-calibrate-btn--top.is-pressing {
  animation: ghostExercise1PressSpring 220ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] #touchPad.is-pressing {
  animation: ghostExercise1TouchImpact 260ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-label.is-flashing {
  animation: ghostExercise1LabelPop 360ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-label.is-flashing.is-rushed {
  color: #eb5757;
  text-shadow: 0 0 14px rgba(235, 87, 87, 0.32);
}

/* Final responsive authority for Exercise 1 */
@media (max-width: 1024px) {
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] {
    min-height: 100dvh;
    overflow-y: auto;
    padding: 8px 10px calc(12px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading-ornaments {
    position: static;
    transform: none;
    justify-content: center;
    margin-bottom: 2px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-header {
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 10px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading h3 {
    font-size: clamp(1.9rem, 4.3vw, 2.6rem);
    line-height: 0.92;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading p {
    max-width: 38ch;
    font-size: 0.8rem;
    line-height: 1.14;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-shell {
    padding: 12px 12px 10px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-dot {
    width: clamp(22px, 2.5vw, 26px);
    height: clamp(22px, 2.5vw, 26px);
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-shell {
    display: grid;
    grid-template-columns: minmax(78px, 96px) minmax(0, 1fr) minmax(78px, 96px);
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard {
    width: 100%;
    min-width: 0;
    min-height: 92px;
    padding: 8px 6px;
    border-radius: 18px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard strong {
    font-size: clamp(1.45rem, 2.6vw, 1.8rem);
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-kicker,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-sub {
    font-size: 0.62rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub {
    width: 100%;
    max-width: 300px;
    justify-self: center;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub strong {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-ring {
    max-width: min(100%, 232px);
    min-height: 102px;
    padding: 8px 10px 8px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-grid {
    max-width: 920px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(92px, auto);
    gap: 8px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad {
    min-height: 92px;
    padding: 8px 6px 7px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-face {
    width: 42px;
    height: 42px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-icon {
    font-size: 1.08rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-face strong {
    font-size: 0.72rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-label {
    min-height: 22px;
    font-size: 0.58rem;
    padding: 0 8px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-controls {
    grid-template-columns: minmax(160px, 1fr) 1fr;
    gap: 6px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bottom-panel {
    grid-template-columns: minmax(146px, 1fr) 138px minmax(146px, 1fr);
    grid-template-areas: "precision touch helper";
    align-items: center;
    gap: 8px;
    padding: 10px 10px 10px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad {
    width: 132px;
    height: 132px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card {
    min-height: 132px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card strong {
    font-size: 0.84rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card span {
    font-size: 0.68rem;
    line-height: 1.1;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-ghost {
    font-size: 2rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-start-btn {
    min-height: 46px;
    width: min(100%, 280px);
    font-size: 0.9rem;
    margin-top: 4px;
  }
}

@media (max-width: 640px) {
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] {
    padding: 6px 8px calc(12px + env(safe-area-inset-bottom, 0px));
    gap: 6px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-header {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "back calibrate"
      "heading heading";
    align-items: start;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-metronome-back {
    grid-area: back;
    justify-self: start;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-metronome-calibrate-btn--top {
    grid-area: calibrate;
    justify-self: end;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading {
    grid-area: heading;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading h3 {
    font-size: clamp(1.34rem, 7vw, 1.86rem);
    line-height: 0.94;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading p {
    max-width: 28ch;
    font-size: 0.64rem;
    line-height: 1.04;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress {
    padding: 0;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-title {
    font-size: 0.66rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-dot {
    width: 18px;
    height: 18px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-step::after {
    left: calc(50% + 11px);
    width: calc(100% - 8px);
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-shell {
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    gap: 4px;
    align-items: center;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub {
    grid-column: auto;
    max-width: 168px;
    order: 0;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard {
    min-height: 62px;
    padding: 4px 3px;
    border-radius: 12px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-icon {
    font-size: 1rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard strong {
    font-size: 1rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-kicker,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-sub {
    font-size: 0.46rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-ring {
    max-width: min(100%, 156px);
    min-height: 64px;
    padding: 5px 7px;
    border-width: 2px;
    box-shadow: inset 0 0 0 4px rgba(255,255,255,0.88), 0 0 0 5px rgba(255, 82, 61, 0.08);
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle {
    min-width: min(100%, 128px);
    min-height: 24px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle-option,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle-badge {
    font-size: 0.5rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-kicker,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub #ghost-metronome-combo-sub,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-praise,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-stars {
    font-size: 0.56rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub strong {
    font-size: clamp(1.22rem, 6vw, 1.6rem);
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(64px, auto);
    gap: 4px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad {
    min-height: 64px;
    padding: 5px 4px 4px;
    border-radius: 12px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-face {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-icon {
    font-size: 0.7rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-face strong {
    font-size: 0.54rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-label,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-now {
    font-size: 0.44rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-label {
    min-height: 16px;
    padding: 0 5px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-controls {
    grid-template-columns: minmax(104px, 1fr) 1fr;
    gap: 4px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar {
    grid-template-columns: auto 1fr;
    gap: 5px;
    padding: 6px 8px;
    min-height: 34px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar strong,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar span {
    font-size: 0.54rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bottom-panel {
    grid-template-columns: minmax(96px, 1fr) 78px minmax(96px, 1fr);
    grid-template-areas:
      "precision touch helper";
    justify-items: stretch;
    gap: 4px;
    padding: 6px;
    border-radius: 16px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad {
    width: 78px;
    height: 78px;
    justify-self: center;
    padding: 5px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad-icon {
    font-size: 0.94rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad strong {
    font-size: 0.64rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad-caption {
    font-size: 0.5rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card {
    min-height: 78px;
    padding: 6px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card strong {
    font-size: 0.64rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card span {
    font-size: 0.52rem;
    line-height: 1.08;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-ghost {
    font-size: 1.1rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-start-btn {
    width: 100%;
    min-height: 38px;
    font-size: 0.76rem;
  }
}

@media (max-width: 430px) {
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] {
    padding: 4px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    gap: 4px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-metronome-back,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-metronome-calibrate-btn--top {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.7rem;
    border-radius: 12px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading h3 {
    font-size: clamp(1.2rem, 6.4vw, 1.58rem);
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading p {
    font-size: 0.58rem;
    line-height: 1;
    max-width: 26ch;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-shell {
    padding: 8px 8px 7px;
    border-radius: 16px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-title {
    font-size: 0.6rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-step::after {
    left: calc(50% + 10px);
    width: calc(100% - 6px);
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-shell {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    gap: 3px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard {
    min-height: 56px;
    padding: 3px 2px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard strong {
    font-size: 0.92rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-kicker,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-sub {
    font-size: 0.42rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub {
    max-width: 152px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub strong {
    font-size: clamp(1.08rem, 5.4vw, 1.4rem);
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-ring {
    max-width: min(100%, 144px);
    min-height: 58px;
    padding: 4px 6px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-kicker,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub #ghost-metronome-combo-sub,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-praise,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-stars {
    font-size: 0.5rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-grid {
    grid-auto-rows: minmax(58px, auto);
    gap: 3px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad {
    min-height: 58px;
    padding: 4px 3px;
    border-radius: 10px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-face {
    width: 24px;
    height: 24px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-label,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-now {
    font-size: 0.4rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-label {
    min-height: 14px;
    padding: 0 4px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar {
    gap: 4px;
    padding: 3px 6px;
    min-height: 26px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar strong,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar span {
    font-size: 0.5rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bottom-panel {
    grid-template-columns: minmax(82px, 1fr) 68px minmax(82px, 1fr);
    gap: 3px;
    padding: 2px;
    border-radius: 14px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad {
    width: 64px;
    height: 64px;
    padding: 3px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad-icon {
    font-size: 0.82rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad strong {
    font-size: 0.58rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad-caption,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] #ghost-metronome-pad-sub {
    font-size: 0.44rem;
    line-height: 1;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card {
    min-height: 64px;
    padding: 4px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card strong {
    font-size: 0.58rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card span {
    font-size: 0.46rem;
    line-height: 1;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-ghost {
    font-size: 0.98rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-start-btn {
    min-height: 32px;
    font-size: 0.68rem;
  }
}

@media (max-width: 430px) and (max-height: 760px) {
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] {
    padding: 2px 5px calc(6px + env(safe-area-inset-bottom, 0px));
    gap: 3px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-metronome-back,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-metronome-calibrate-btn--top {
    min-height: 28px;
    padding: 0 8px;
    font-size: 0.64rem;
    border-radius: 10px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading-ornaments {
    margin-bottom: 0;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading-note,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading-star {
    font-size: 0.72rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading label {
    padding: 0.22rem 0.7rem;
    font-size: 0.58rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading h3 {
    font-size: clamp(1rem, 5.6vw, 1.34rem);
    line-height: 0.92;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading p {
    font-size: 0.52rem;
    line-height: 0.96;
    max-width: 24ch;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-shell {
    padding: 6px 7px 5px;
    border-radius: 14px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-title {
    font-size: 0.54rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-dot {
    width: 15px;
    height: 15px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-shell {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 2px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard {
    min-height: 46px;
    padding: 2px 1px;
    border-radius: 10px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-icon {
    font-size: 0.84rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard strong {
    font-size: 0.8rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-kicker,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-sub {
    font-size: 0.38rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub {
    max-width: 130px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub strong {
    font-size: clamp(0.94rem, 5vw, 1.18rem);
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-kicker,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub #ghost-metronome-combo-sub,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-praise,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-stars {
    font-size: 0.44rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-burst {
    display: none;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-ring {
    max-width: min(100%, 124px);
    min-height: 48px;
    padding: 3px 5px;
    border-width: 2px;
    box-shadow: inset 0 0 0 3px rgba(255,255,255,0.88), 0 0 0 4px rgba(255, 82, 61, 0.07);
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-ring-icon {
    font-size: 0.62rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-mode-title {
    font-size: 0.5rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle {
    min-width: min(100%, 110px);
    min-height: 20px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle-option,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle-badge {
    font-size: 0.42rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-waveform {
    gap: 2px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-waveform span {
    width: 4px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-grid {
    grid-auto-rows: minmax(48px, auto);
    gap: 2px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad {
    min-height: 48px;
    padding: 3px 2px;
    border-radius: 9px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-face {
    width: 20px;
    height: 20px;
    border-radius: 6px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-icon {
    font-size: 0.58rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-face strong {
    font-size: 0.46rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-label,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-now {
    font-size: 0.36rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-label {
    min-height: 12px;
    padding: 0 3px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar {
    gap: 3px;
    padding: 2px 5px;
    min-height: 22px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar strong,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar span {
    font-size: 0.46rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bottom-panel {
    grid-template-columns: minmax(72px, 1fr) 56px minmax(72px, 1fr);
    gap: 2px;
    padding: 1px;
    border-radius: 12px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-controls {
    grid-template-columns: minmax(72px, 1fr) 1fr;
    gap: 2px;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad {
    width: 56px;
    height: 56px;
    padding: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    overflow: hidden;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad-icon {
    font-size: 0.72rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad strong {
    font-size: 0.5rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad-caption,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] #ghost-metronome-pad-sub {
    font-size: 0.38rem;
    line-height: 0.96;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad-caption,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] #ghost-metronome-pad-sub,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card span,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-ghost {
    display: none;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card {
    min-height: 56px;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card strong {
    font-size: 0.5rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card span {
    font-size: 0.4rem;
    line-height: 0.96;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-ghost {
    font-size: 0.86rem;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-start-btn {
    min-height: 28px;
    font-size: 0.62rem;
    margin-top: 2px;
  }
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-label.is-flashing.is-perfect {
  color: #18a957;
  text-shadow: 0 0 14px rgba(46, 204, 113, 0.32);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-label.is-flashing.is-delayed {
  color: #f39c12;
  text-shadow: 0 0 14px rgba(243, 156, 18, 0.32);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bpm-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bpm-modal.hidden {
  display: none;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bpm-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(44, 37, 35, 0.24);
  backdrop-filter: blur(8px);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bpm-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 440px);
  border-radius: 28px;
  border: 1px solid rgba(44, 37, 35, 0.08);
  background: linear-gradient(180deg, #fffefc 0%, #faf5ef 100%);
  box-shadow: 0 24px 50px rgba(76, 37, 31, 0.16);
  padding: 18px;
  display: grid;
  gap: 14px;
  animation: modalPop 220ms ease;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bpm-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bpm-card-head strong {
  display: block;
  font-size: 1rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bpm-card-head span {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: rgba(44, 37, 35, 0.7);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bpm-close,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bpm-stepper,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bpm-preset {
  border: 1px solid rgba(44, 37, 35, 0.08);
  border-radius: 16px;
  background: rgba(255,255,255,0.9);
  color: var(--text-color);
  font-weight: 800;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bpm-live {
  justify-self: center;
  min-width: 124px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7f6d 0%, var(--brand-primary) 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(255, 82, 61, 0.24);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bpm-slider {
  width: 100%;
  accent-color: var(--brand-primary);
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bpm-input-row {
  display: grid;
  grid-template-columns: 74px 1fr 74px;
  gap: 10px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bpm-input,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bpm-stepper {
  min-height: 46px;
  text-align: center;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bpm-input {
  border-radius: 16px;
  border: 1px solid rgba(44, 37, 35, 0.08);
  background: rgba(255,255,255,0.96);
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 900;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bpm-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bpm-preset {
  min-height: 40px;
  padding: 0 12px;
}

.app-root-menu-featured {
  appearance: none;
  border: 1px solid rgba(85, 153, 255, 0.28);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(109, 182, 255, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(245, 250, 255, 0.98) 0%, rgba(255, 255, 255, 0.98) 48%, rgba(243, 248, 255, 0.98) 100%);
  box-shadow: 0 18px 36px rgba(58, 113, 196, 0.12);
  color: #1f2a37;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.app-root-menu-featured:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 40px rgba(58, 113, 196, 0.16);
  border-color: rgba(85, 153, 255, 0.36);
}

.app-root-menu-featured strong {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.1;
  color: #1b2735;
}

.app-root-menu-featured > span:last-child {
  color: #486079;
  font-size: 0.98rem;
  line-height: 1.45;
}

.app-root-menu-featured-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4d7fbe;
}

@keyframes elasticPop {
  0% {
    transform: scale(1);
    box-shadow: 0 16px 32px rgba(76, 37, 31, 0.08);
  }
  42% {
    transform: scale(1.04);
    box-shadow: 0 22px 40px rgba(255, 82, 61, 0.18);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 16px 32px rgba(76, 37, 31, 0.08);
  }
}

@keyframes indicatorPop {
  0% {
    transform: translateY(-50%) scale(1);
    opacity: 0.88;
  }
  42% {
    transform: translateY(-50%) scale(1.14);
    opacity: 1;
  }
  100% {
    transform: translateY(-50%) scale(1);
    opacity: 0.88;
  }
}

@keyframes ghostExercise1PressSpring {
  0% { transform: scale(1); }
  40% { transform: scale(0.92); }
  78% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes ghostExercise1TouchImpact {
  0% {
    transform: scale(1);
    box-shadow:
      0 0 0 4px rgba(255, 255, 255, 0.92),
      0 0 0 8px rgba(255, 82, 61, 0.18),
      0 0 0 14px rgba(255, 82, 61, 0.08),
      0 20px 34px rgba(76, 37, 31, 0.1);
  }
  38% {
    transform: scale(0.92);
    box-shadow:
      0 0 0 5px rgba(255, 255, 255, 0.92),
      0 0 0 12px rgba(255, 82, 61, 0.22),
      0 0 0 18px rgba(255, 82, 61, 0.12),
      0 24px 40px rgba(255, 82, 61, 0.16);
  }
  78% { transform: scale(1.04); }
  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 4px rgba(255, 255, 255, 0.92),
      0 0 0 8px rgba(255, 82, 61, 0.18),
      0 0 0 14px rgba(255, 82, 61, 0.08),
      0 20px 34px rgba(76, 37, 31, 0.1);
  }
}

@keyframes ghostExercise1LabelPop {
  0% { transform: translateY(0) scale(1); }
  38% { transform: translateY(-4px) scale(1.14); }
  78% { transform: translateY(0) scale(0.98); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes ghostExercise1Pulse {
  0%, 100% { box-shadow: 0 12px 20px rgba(255, 82, 61, 0.24); filter: saturate(1); }
  50% { box-shadow: 0 16px 30px rgba(255, 82, 61, 0.32); filter: saturate(1.05); }
}

@keyframes modalPop {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(18px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes blockSelectionSheetIn {
  0% {
    opacity: 0;
    transform: translateY(28px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 430px) and (max-height: 760px) {
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] {
    padding: 2px 5px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    gap: 3px !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-header {
    gap: 4px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-metronome-back,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-metronome-calibrate-btn--top {
    min-height: 28px !important;
    padding: 0 8px !important;
    font-size: 0.64rem !important;
    border-radius: 10px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading label {
    padding: 0.18rem 0.62rem !important;
    font-size: 0.54rem !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading h3 {
    font-size: 0.98rem !important;
    line-height: 0.92 !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading p {
    font-size: 0.48rem !important;
    line-height: 0.92 !important;
    max-width: 23ch !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-shell {
    padding: 5px 6px 4px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-title {
    font-size: 0.5rem !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-dot {
    width: 14px !important;
    height: 14px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-shell {
    grid-template-columns: 40px minmax(0, 1fr) 40px !important;
    gap: 2px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard {
    min-height: 40px !important;
    padding: 1px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-icon {
    font-size: 0.72rem !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard strong {
    font-size: 0.72rem !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-kicker,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-sub {
    font-size: 0.34rem !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub {
    max-width: 118px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub strong {
    font-size: 0.88rem !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-kicker,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub #ghost-metronome-combo-sub,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-praise,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-stars {
    font-size: 0.4rem !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-ring {
    max-width: 112px !important;
    min-height: 42px !important;
    padding: 2px 4px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle {
    min-width: 98px !important;
    min-height: 18px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle-option,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-mode-toggle-badge,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-mode-title {
    font-size: 0.38rem !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-grid {
    grid-auto-rows: minmax(44px, auto) !important;
    gap: 2px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad {
    min-height: 44px !important;
    padding: 2px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-face {
    width: 18px !important;
    height: 18px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-icon {
    font-size: 0.52rem !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-face strong {
    font-size: 0.42rem !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-label,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-now {
    font-size: 0.32rem !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar {
    padding: 2px 4px !important;
    min-height: 20px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar strong,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar span {
    font-size: 0.42rem !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bottom-panel {
    grid-template-columns: minmax(68px, 1fr) 44px minmax(68px, 1fr) !important;
    gap: 1px !important;
    padding: 1px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad {
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 1px !important;
    gap: 0 !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad strong {
    font-size: 0.42rem !important;
    line-height: 0.9 !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad-icon,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad-caption,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] #ghost-metronome-pad-sub,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card span,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-ghost {
    display: none !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card {
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card strong {
    font-size: 0.42rem !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-start-btn {
    min-height: 24px !important;
    font-size: 0.56rem !important;
    margin-top: 1px !important;
  }
}


.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-header {
  min-height: clamp(34px, 6dvh, 52px);
  padding: clamp(6px, 1.4dvh, 12px) clamp(10px, 2vw, 16px) 0;
  align-items: center;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-heading--compact {
  display: none !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-inline-icon,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-icon-art,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-icon-art,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad-icon-art,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-stars-art,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-arrow img {
  display: block;
  max-width: 100%;
  object-fit: contain;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-inline-icon {
  width: 18px;
  height: 18px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-inline-icon--tiny {
  width: 14px;
  height: 14px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-inline-icon--small {
  width: 28px;
  height: 28px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-metronome-calibrate-btn--top,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-title,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-sub,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-kicker,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] #ghost-metronome-combo-value,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-stars,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-label.is-center,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-icon-art {
  width: 22px;
  height: 22px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-icon-art {
  width: 14px;
  height: 14px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad-icon-art {
  width: 18px;
  height: 18px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-stars {
  justify-content: center;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-stars-art {
  width: 14px;
  height: 14px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-arrow img {
  width: 12px;
  height: 12px;
  opacity: 0.82;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-precision-label-icon {
  width: 11px;
  height: 11px;
}

.ghost-ex1-intro-modal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 35;
}

.ghost-ex1-intro-modal.hidden {
  display: none;
}

.ghost-ex1-intro-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(28, 18, 15, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ghost-ex1-intro-card {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100% - 28px));
  border-radius: 28px;
  border: 1px solid rgba(76, 37, 31, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 246, 242, 0.98));
  box-shadow: 0 24px 60px rgba(76, 37, 31, 0.18);
  padding: 22px 20px 18px;
  display: grid;
  gap: 12px;
  text-align: center;
}

.ghost-ex1-intro-ornaments {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.ghost-ex1-intro-ornaments img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.ghost-ex1-intro-kicker {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7d65 0%, #ff523d 100%);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ghost-ex1-intro-card strong {
  font-size: clamp(1.65rem, 5vw, 2.4rem);
  line-height: 0.95;
  color: var(--text-color);
}

.ghost-ex1-intro-card p {
  margin: 0;
  color: rgba(44, 37, 35, 0.8);
  font-size: 1rem;
  line-height: 1.35;
}

.ghost-ex1-intro-cta {
  justify-self: center;
  min-width: 180px;
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7d65 0%, #ff523d 100%);
  box-shadow: 0 16px 34px rgba(255, 82, 61, 0.22);
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
}

@media (max-width: 430px) and (max-height: 760px) {
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-header {
    min-height: 26px !important;
    padding: 4px 8px 0 !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-metronome-back,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-metronome-calibrate-btn--top {
    min-height: 26px !important;
    padding: 0 8px !important;
    border-radius: 12px !important;
    font-size: 0.56rem !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-progress-shell {
    margin-top: 2px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-shell {
    grid-template-columns: 36px minmax(0, 1fr) 36px !important;
    gap: 6px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard {
    min-height: 76px !important;
    padding: 6px 2px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-sidecard-icon-art {
    width: 18px !important;
    height: 18px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub {
    max-width: 188px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-hub-ring {
    max-width: 164px !important;
    min-height: 88px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-grid {
    grid-auto-rows: minmax(58px, auto) !important;
    gap: 4px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad {
    min-height: 58px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad-face {
    width: 24px !important;
    height: 24px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar {
    min-height: 24px !important;
    padding: 3px 6px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bottom-panel {
    grid-template-columns: minmax(88px, 1fr) 74px minmax(88px, 1fr) !important;
    min-height: 92px !important;
    gap: 4px !important;
    padding: 4px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad {
    width: 74px !important;
    height: 74px !important;
    min-height: 74px !important;
    max-height: 74px !important;
    padding: 3px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad strong {
    font-size: 0.8rem !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad-icon {
    display: inline-flex !important;
    font-size: 0.9rem !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad-icon-art {
    width: 14px !important;
    height: 14px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-touchpad-caption,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] #ghost-metronome-pad-sub {
    display: none !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card {
    min-height: 74px !important;
    max-height: 74px !important;
    justify-content: center !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card strong {
    font-size: 0.72rem !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-card span,
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-helper-ghost {
    display: none !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-start-btn {
    min-height: 34px !important;
    font-size: 0.8rem !important;
    margin-top: 4px !important;
  }

  .ghost-ex1-intro-card {
    width: min(360px, calc(100% - 20px));
    border-radius: 22px;
    padding: 18px 16px 14px;
    gap: 10px;
  }

  .ghost-ex1-intro-kicker {
    min-height: 28px;
    padding: 0 14px;
    font-size: 0.72rem;
  }

  .ghost-ex1-intro-ornaments img {
    width: 14px;
    height: 14px;
  }

  .ghost-ex1-intro-card strong {
    font-size: 1.55rem;
  }

  .ghost-ex1-intro-card p {
    font-size: 0.88rem;
  }

  .ghost-ex1-intro-cta {
    min-width: 150px;
    min-height: 42px;
    font-size: 0.88rem;
  }
}


.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar--precision {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar--precision .ghost-ex1-controls,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar--precision .ghost-metronome-precision-shell {
  width: 100%;
  max-width: 100%;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar--precision strong::before {
  content: none !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bottom-panel--solo {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  grid-template-columns: none !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bottom-panel--solo .ghost-ex1-touchpad {
  margin-inline: auto;
}

@media (max-width: 430px) and (max-height: 760px) {
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar--precision {
    width: 100% !important;
    min-height: 46px !important;
    padding: 4px 2px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar--precision .ghost-metronome-precision-shell {
    padding: 4px 8px !important;
    gap: 4px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar--precision .ghost-metronome-precision-track {
    width: 100% !important;
    min-height: 14px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar--precision .ghost-metronome-precision-labels {
    gap: 6px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar--precision .ghost-metronome-precision-label {
    font-size: 0.52rem !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bottom-panel--solo {
    min-height: 86px !important;
    padding: 2px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-bottom-panel--solo .ghost-ex1-touchpad {
    width: 92px !important;
    height: 92px !important;
    min-height: 92px !important;
    max-height: 92px !important;
  }
}


.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar--precision {
  width: 100% !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar--precision .ghost-ex1-precision-shell {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  padding: 6px 8px !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar--precision .ghost-ex1-precision-meter {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr) 18px !important;
  width: 100% !important;
  gap: 8px !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar--precision .ghost-ex1-precision-track {
  width: 100% !important;
  min-width: 0 !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar--precision .ghost-ex1-precision-labels {
  width: 100% !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad.is-filled.is-ghost {
  background: linear-gradient(180deg, #9be6b1 0%, #55cf7b 100%) !important;
  border-color: rgba(46, 204, 113, 0.32) !important;
  box-shadow: 0 18px 30px rgba(46, 204, 113, 0.18) !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad.is-filled.is-ghost .ghost-ex1-pad-face {
  background: rgba(255, 255, 255, 0.94) !important;
  color: #14954b !important;
}

.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad.is-filled.is-ghost .ghost-ex1-pad-face strong,
.ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-pad.is-filled.is-ghost .ghost-ex1-pad-label {
  color: #145c31 !important;
}

@media (max-width: 430px) and (max-height: 760px) {
  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar--precision .ghost-ex1-precision-shell {
    padding: 4px 4px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar--precision .ghost-ex1-precision-meter {
    grid-template-columns: 14px minmax(0, 1fr) 14px !important;
    gap: 4px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar--precision .ghost-ex1-precision-track {
    min-height: 16px !important;
  }

  .ghost-metronome-screen[data-ghost-exercise="exercise-1"] .ghost-ex1-status-bar--precision .ghost-metronome-perfect-band {
    width: 34% !important;
  }
}

@media (max-width: 1100px) and (orientation: portrait) {
  body.practice-screen {
    --dice-size-base: 60px;
  }

  body.practice-screen #page {
    min-height: 100dvh;
    padding-top: max(14px, env(safe-area-inset-top, 0px));
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  body.practice-screen .top-navbar {
    min-height: 50px;
    padding-top: max(4px, env(safe-area-inset-top, 0px));
    padding-bottom: 4px;
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  body.practice-screen .brand-lockup {
    gap: 0.4rem;
  }

  body.practice-screen .navbar-logo {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }

  body.practice-screen .navbar-title {
    display: block;
    font-size: clamp(1rem, 2.9vw, 1.2rem);
  }

  body.practice-screen .navbar-right {
    display: flex;
  }

  body.practice-screen #container-bg {
    width: min(100vw - 28px, 860px) !important;
    min-height: calc(100dvh - max(58px, env(safe-area-inset-top, 0px) + 44px) - env(safe-area-inset-bottom, 0px) - 12px);
    height: auto;
    margin-top: 18px;
    margin-bottom: 8px;
    padding: 1.35rem 1.15rem 1rem;
    border-radius: 28px;
  }

  body.practice-screen .title-row {
    display: flex !important;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.55rem;
  }

  body.practice-screen .title-row h2 {
    font-size: clamp(2rem, 5vw, 3rem);
  }

  body.practice-screen #countdown {
    gap: 0.45rem;
  }

  body.practice-screen #countdown .dot {
    width: 14px;
    height: 14px;
  }

  body.practice-screen .dice-container {
    --dice-gap: 6px;
    padding: 0 0 0.35rem;
  }

  body.practice-screen #cat-row {
    display: none;
  }

  body.practice-screen #quarter-p {
    display: block;
    font-size: 1rem;
  }

  body.practice-screen .mobile-quick-controls {
    display: grid !important;
    width: min(100%, 520px);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.4rem;
  }

  body.practice-screen .mobile-quick-action {
    height: 48px;
    border-radius: 16px;
  }

  body.practice-screen .mobile-quick-action img,
  body.practice-screen .mobile-quick-action svg {
    width: 20px;
    height: 20px;
  }

  body.practice-screen .tap-assessment-panel {
    width: 100%;
    margin-top: 0.5rem;
  }

  body.practice-screen .tap-practice-shell {
    width: 100%;
    min-height: 118px;
    gap: 0.4rem;
    padding: 0.38rem 0.42rem;
    border-radius: 18px;
  }

  body.practice-screen .tap-panel-actions {
    gap: 0.48rem;
    justify-content: space-between;
  }

  body.practice-screen .tap-panel-action {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  body.practice-screen .tap-pad {
    min-height: 108px;
    padding: 8px 10px;
    border-radius: 18px;
  }

  body.practice-screen .tap-pad-choice {
    min-height: 72px;
  }

  body.practice-screen #tap-pad-label {
    margin-top: 0.7rem;
    font-size: 0.82rem;
  }

  body.practice-screen #tap-pad-sub,
  body.practice-screen .tap-pad-mode-text {
    font-size: 0.7rem;
  }
}

@media (max-width: 430px) and (orientation: portrait) {
  body.practice-screen {
    --dice-size-base: 44px;
  }

  body.practice-screen #page {
    padding-top: max(18px, env(safe-area-inset-top, 0px));
  }

  body.practice-screen #container-bg {
    width: min(100vw - 14px, 430px) !important;
    min-height: calc(100dvh - max(50px, env(safe-area-inset-top, 0px) + 40px) - env(safe-area-inset-bottom, 0px) - 8px);
    margin-top: 18px;
    padding: 1.12rem 0.72rem 0.78rem;
    border-radius: 22px;
  }

  body.practice-screen .top-navbar {
    min-height: 42px;
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }

  body.practice-screen .navbar-title {
    font-size: 1rem;
  }

  body.practice-screen .title-row {
    margin-bottom: 0.35rem;
  }

  body.practice-screen .title-row h2 {
    font-size: 2rem;
  }

  body.practice-screen #countdown .dot {
    width: 12px;
    height: 12px;
  }

  body.practice-screen .mobile-quick-controls {
    width: 100%;
    gap: 0.38rem;
    margin-top: 0.32rem;
  }

  body.practice-screen .mobile-quick-action {
    height: 42px;
    border-radius: 14px;
  }

  body.practice-screen .tap-assessment-panel {
    width: 100%;
    margin-top: 0.4rem;
  }

  body.practice-screen .tap-practice-shell {
    width: 100%;
    min-height: 100px;
    padding: 0.3rem 0.32rem;
    gap: 0.32rem;
    border-radius: 16px;
  }

  body.practice-screen .tap-panel-action {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  body.practice-screen .tap-pad {
    min-height: 92px;
    padding: 6px 8px;
    border-radius: 16px;
  }

  body.practice-screen .tap-pad-choice {
    min-height: 64px;
  }

  body.practice-screen #tap-pad-label {
    font-size: 0.72rem;
    margin-top: 0.46rem;
  }

  body.practice-screen #tap-pad-sub,
  body.practice-screen .tap-pad-mode-text {
    font-size: 0.62rem;
  }
}
