html.is-mobile,
html.is-mobile body {
  background-color: #000 !important;
}

html.is-mobile::before,
html.is-mobile::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  background: #000;
  z-index: 9998;
  pointer-events: none;
}

html.is-mobile::before {
  top: 0;
  height: env(safe-area-inset-top, 0px);
}

html.is-mobile::after {
  bottom: 0;
  height: env(safe-area-inset-bottom, 0px);
}

html, body, .content, .img-wrapper, .song-panel, .title-cell,
.song-title, .song-artist, .song-bpm, .song-chain, .song-notes-designer,
.notes-breakdown, .song-notes-display, .song-credit-line, .song-spec-line,
.message {
  font-family: Verdana, sans-serif;
}
html.is-mobile,
html.is-mobile body {
  height: 100% !important;
  margin: 0;
  overflow: hidden !important;
  background-color: transparent;
  touch-action: none;
  box-sizing: border-box;
}

html.is-mobile .content {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  overflow: hidden !important;
  touch-action: none;
  background-color: transparent;
}

html.is-mobile .img-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: fit-content;
  touch-action: none;
  transform-origin: 0 0;
  padding-top: 1px;
  padding-left: 8px;
  padding-right: 8px;
  box-sizing: border-box;
  background: transparent;
}

html.is-mobile .score-layers,
html.is-mobile .score-layers img {
  touch-action: none;
}

html.is-desktop,
html.is-desktop body {
  overflow: hidden !important;
}

html.is-desktop .content {
  overflow: hidden !important;
  touch-action: none;
}

html.is-desktop .img-wrapper {
  padding-left: 8px;
  padding-right: 8px;
  box-sizing: border-box;
  background: transparent;
}

html.is-ios,
html.is-ios body {
  height: 100% !important;
  margin: 0;
  overflow: hidden !important;
  background-color: transparent;
  touch-action: none;
  box-sizing: border-box;
}

html.is-ios .content {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  overflow: hidden !important;
  touch-action: none;
  background-color: transparent;
}

html.is-ios .img-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  touch-action: none;
  transform-origin: 0 0;
  padding-left: 8px;
  padding-right: 8px;
  box-sizing: border-box;
  background: transparent;
}

html.is-ios .score-layers,
html.is-ios .score-layers img {
  touch-action: none;
}

html.is-ios .ios-fixed-ui {
  position: fixed;
  z-index: 1000;
  top: max(8px, env(safe-area-inset-top, 0px));
  right: max(8px, env(safe-area-inset-right, 0px));
}
@media (orientation: landscape) {
  html.is-ios .img-wrapper,
  html.is-mobile .img-wrapper {
    padding-left: max(56px, calc(env(safe-area-inset-left, 0px) * 2));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
    background: transparent;
  }
}

.close-btn {
  position: fixed !important;
  top: 8px !important;
  right: 8px !important;
  z-index: 9999 !important;
  width: 42px;
  height: 42px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
  transform: none !important;
}
.close-btn:active {
  transform: scale(0.92);
  background: rgba(0, 0, 0, 0.85);
}
.close-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.content {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  background-color: transparent;
  overscroll-behavior: contain;
}
.img-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: fit-content;
  padding-bottom: 80px;
  transform-origin: 0 0;
}
.score-layers {
  position: relative;
  line-height: 0;
  margin-top: 0;
  padding-top: 20px;
  padding-bottom: 20px;
  background: rgba(0, 0, 0, 0.8);
}
.base-img, .overlay-img {
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
}
.base-img {
  display: block;
  height: auto;
}
.overlay-img {
  position: absolute;
  top: 20px;
  left: 0;
  height: calc(100% - 40px);
}
#barImg {
  z-index: 2;
}
#objImg {
  z-index: 1;
}
.header-inline {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 100px;
  margin-bottom: 0;
  z-index: 40;
  width: fit-content;
}
.song-panel {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: fit-content;
  background: rgba(0, 0, 0, 0.8);
  padding: 8px 8px 0;
  box-sizing: border-box;
}
.jacket-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  z-index: 60;
}
.song-jacket {
  width: 100px;
  height: 100px;
  object-fit: cover;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.mrr-btn {
  width: 100px;
  cursor: pointer;
  margin-top: 9px; 
  padding-top: 5px;
  padding-bottom: 5px;
  box-sizing: content-box;
  display: block;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.mrr-btn:active {
  transform: scale(0.96);
}
.song-lv-icon {
  width: 35px;
  height: 35px;
  object-fit: contain;
  margin: 2px 0 auto 0;
  flex-shrink: 0;
  display: block;
}
.title-cell {
  display: flex;
  flex-direction: column;
  flex-grow: 0;
  width: fit-content;
}
.song-title {
  font-size: 14px;
  line-height: 1.3;
  color: #fff;
  text-shadow: 1px 1px 2px #000;
}
.song-artist {
  font-size: 11px;
  line-height: 1.3;
  color: #ccc;
  text-shadow: 1px 1px 2px #000;
  margin-top: 2px;
}
.song-bpm-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 2px;
}
.song-bpm {
  font-size: 11px;
  line-height: 1.3;
  color: #66ff00;
  text-shadow: 1px 1px 2px #000;
}
.song-chain {
  font-size: 11px;
  line-height: 1.3;
  color: #ffffff;
  text-shadow: 1px 1px 2px #000;
}
.song-notes-designer {
  font-size: 10px;
  line-height: 1.2;
  color: #ff99ff;
  text-shadow: 1px 1px 2px #000;
  margin-top: 2px;
}
.logo-yt-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  margin-left: -45px;
  flex-wrap: wrap;
}
.song-logo {
  position: relative;
  top: auto !important;
  left: auto !important;
  object-fit: contain;
  pointer-events: none;
  z-index: 45;
  height: auto;
  max-height: 80px;
  width: auto;
  max-width: 150px;
  flex-shrink: 0;
}
.viewer-yt-container {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  margin-left: 0;
  margin-top: 0;
  margin-bottom: 0;
  flex-shrink: 0;
  max-width: none;
}
.notes-breakdown {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-left: 3px;
  align-self: center;
  font-size: 11px;
  line-height: 1.2;
  text-shadow: 1px 1px 2px #000;
  flex-shrink: 0;
}
.note-line {
  display: flex;
  align-items: baseline;
  white-space: nowrap;
}
.note-label {
  min-width: 42px;
  text-align: right;
  font-weight: normal;
}
.note-colon {
  margin: 0 4px;
}
.note-val {
  text-align: left;
  min-width: 36px;
}
.note-bar {
  display: inline-block;
  height: 5px;
  margin-left: 1px;
  background: currentColor;
  vertical-align: middle;
  border-radius: 1px;
  opacity: 0.85;
}
.note-bar-damage {
  background: #2244aa;
  margin-left: 0;
}
.note-damage-val {
  margin-left: 4px;
  font-size: 10px;
  color: #88aaff;
  min-width: 20px;
}
.note-tap { color: #ff8888; }
.note-hold { color: #ffdd44; }
.note-slide { color: #55aaff; }
.note-air { color: #55ff88; }
.note-flick { color: #66ffff; }
.song-notes-display {
  font-size: 12px;
  text-shadow: 1px 1px 2px #000;
  margin-top: 2px;
}
.song-notes-display.notes-easy { color: #9eff5e; }
.song-notes-display.notes-normal { color: #66d4ff; }
.song-notes-display.notes-hard { color: #ffc44d; }
.song-notes-display.notes-expert { color: #ff708a; }
.song-notes-display.notes-master { color: #d685ff; }
.song-notes-display.notes-append { color: #ff8ae2; }
.song-credit-line {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 10px;
  line-height: 1.2;
  color: #ff99ff;
  text-shadow: 1px 1px 2px #000;
  margin-top: 4px;
}
.song-spec-line {
  display: flex;
  gap: 8px;
  font-size: 11px;
  text-shadow: 1px 1px 2px #000;
  margin-top: 4px;
}
#specBpm { color: #66ff00; }
#specChain { color: #ffffff; }
#specExscore { color: #ffff00; }
.spec-block, .credit-block {
  margin-top: 2px;
}
.yt-links-wrapper {
  display: flex;
  gap: 6px;
  align-items: center;
}
.viewer-yt-link {
  display: block;
  width: 130px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}
.viewer-yt-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.header-ad-row {
  position: relative;
  top: auto;
  left: auto;
  width: 728px;
  height: auto;
  min-height: 90px;
  margin: 0;
  display: flex;
  flex: 0 0 728px;
  align-self: flex-start;
  z-index: 45;
  box-sizing: content-box;
  overflow: visible;
  background: transparent;
  pointer-events: none;
}
.ad-slot {
  display: block;
  flex: 0 0 728px;
  width: 728px;
  box-sizing: content-box;
  pointer-events: none;
  background: transparent;
}
.ad-slot-header {
  height: auto;
  min-height: 90px;
}
.bottom-ad-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px;
  width: fit-content;
  margin: 10px 0;
  position: relative;
  z-index: 45;
  pointer-events: none;
}
.ad-slot-bottom {
  height: 280px;
  min-height: 280px;
}
.ad-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}
.ad-float {
  position: fixed;
  left: 0;
  top: 0;
  border: none;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  background: transparent;
  z-index: 70;
  transition: opacity 0.15s ease;
}
.header-ad-frame {
  width: 728px;
  height: 90px;
  min-width: 728px;
  min-height: 90px;
  max-width: none;
  max-height: none;
  transform-origin: 0 0;
}
.bottom-ad-frame {
  width: 728px;
  height: 280px;
  min-height: 280px;
  max-width: none;
}
.ad-float::-webkit-scrollbar {
  display: none;
}
.message {
  padding: 60px 20px;
  font-size: 14px;
  color: #ccc;
  text-align: center;
}
