body { font-family: Arial, sans-serif; margin: 0; background: #f5f7fb; color: #222; }
.rm-shell { max-width: 1180px; margin: 0 auto; padding: 1px; }
.rm-tabs { display: flex; gap: 8px; margin-bottom: 1px; flex-wrap: wrap; }
.rm-tab-btn { border: 1px solid #b9c3d6; background: #fff; border-radius: 10px 10px 0 0; padding: 10px 16px; cursor: pointer; font-weight: 600; }
.rm-tab-btn.active { background: #e8f0ff; border-bottom-color: #e8f0ff; }
.rm-tab-panel { display: none; border: 1px solid #b9c3d6; background: #fff; border-radius: 0 12px 12px 12px; padding: 1px; margin-bottom: 1px; }
.rm-tab-panel.active { display: block; }
.rm-control-grid { display: grid; grid-template-columns: max-content 1fr; gap: 10px 14px; align-items: center; max-width: 1050px; }
.rm-control-grid label { font-weight: 600; }
.rm-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rm-vcr { display: flex; justify-content: center; gap: 10px; margin: 8px 0 12px; }
.rm-vcr button { font-size: 22px; min-width: 48px; padding: 8px 12px; border-radius: 10px; border: 1px solid #9aa8bd; background: #fff; cursor: pointer; }
.rm-status { margin-top: 8px; font-weight: 600; color: #315a9c; }
.rm-score-wrap { overflow-x: auto; background: #fff; border: 1px solid #cbd3df; border-radius: 12px; padding: 1px; }
.rm-message { color: #8a3d00; font-weight: 600; margin: 8px 0; }
.rm-vcr button {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
} 
.play-top-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
}

.hands-section img {
  height: 120px;
}  

.tab-panel {
  padding: 12px 16px;
}

.score-container {
  height: calc(100vh - 420px);
  overflow: auto;
}

@keyframes pulseLoad {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(59,130,246,0);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 14px rgba(59,130,246,0.7);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(59,130,246,0);
  }
}

.attention {
  animation: pulseLoad 1.2s infinite;
  background: #e8f1ff;
  border-color: #3b82f6;
}

// New 5/25/26 for settings tab:
.settings-panel {
  padding: 10px 14px;
}

.settings-group {
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
}

.settings-group h3 {
  margin: 0 0 10px 0;
  font-size: 16px;
  font-weight: 600;
}

/* SCORE SECTION */
.score-grid {
  display: grid;
  grid-template-columns: 160px auto;
  row-gap: 8px;
  column-gap: 12px;
  align-items: center;
}

.score-grid label {
  font-weight: 500;
}

.score-grid input[type="text"],
.score-grid input[type="number"] {
  height: 30px;
  padding: 4px 8px;
  font-size: 15px;
}

#timeSig {
  width: 70px;
}

.tempo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

#tempo {
  width: 90px;
}

#resetTempoBtn {
  width: 34px;
  height: 30px;
  cursor: pointer;
}

.measure-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

#measureFrom,
#measureTo {
  width: 70px;
}

/* AUDIO SECTIONS */
.audio-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  row-gap: 8px;
  column-gap: 12px;
  align-items: center;
}

.audio-grid label {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-grid input[type="range"] {
  width: 100%;
  margin: 0;
}

.volume-header {
  font-size: 13px;
  font-weight: 600;
  color: #666;
}

input:disabled {
  opacity: 0.35;
  pointer-events: none;
}
/*Phone styling*/
/* PLAY TAB LAYOUT */
#tab-play {
  height: auto;
  overflow: visible;
}

#playTab {
  display: flex;
  flex-direction: column;
}

/* top controls row */
.play-top-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex: 0 0 auto;
}

/* score area takes remaining height */
.rm-score-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid #ccc;
}

/* desktop defaults */
#svgElement {
  width: 400px;
  height: 400px;
}

.hands-section img {
  width: 125px;
  height: auto;
}

@media (max-width: 700px) and (orientation: portrait) {
    #tab-play {
    height: 100dvh;
    overflow: hidden;
  }

  #playTab {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .rm-score-wrap {
    flex: 1;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .play-top-row {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
  }

  #svgElement {
    width: min(65vw, 280px);
    height: auto;
  }

  .hands-section img {
    width: 70px;
  }

  .rm-vcr button {
    font-size: 1.2rem;
    padding: 0.4rem;
  }

  #sheet {
    height: 220px;
    width: auto;
  }
}

@media screen and (max-height: 500px) and (orientation: landscape) {

  #tab-play,
  #playTab {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  .play-top-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: center !important;

    gap: 0.35rem;

    margin: 0;
    padding: 0;
  }

  #svgElement {
    width: 170px !important;
    height: 170px !important;
  }

  .hands-section img {
    width: 55px !important;
    height: auto !important;
  }

  .rm-vcr {
    margin-top: 35px;
  }

  .rm-score-wrap {
    margin-top: 0.2rem !important;
    padding-top: 0 !important;
  }

  #sheet {
    height: 135px !important;
    width: auto;
  }
}