/* =========================================
   AUDIAR - style.css（ヘッダー右寄せ修正版 / 完全版）
   - header_wrapper:grid(logo / nav_scroller / menu)
   - PC: 右壁 20px / SP(〜490px): 右壁 15px
   - ロゴ「AUDIAR」右マージン 15px
   - nav_scroller: PC margin-right 20px / SP 15px
   - nav_row gap: PC 20px / SP 15px
========================================= */

/*ユーザー操作無効化*/
body,
img,
* {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

/* === 共通設定（背景・基本レイアウト） === */
body {
  color: white;
  background-color: #0a0a0a;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  margin: 0;
  padding: 0;
}

html,
body {
  font-family: "Yu Gothic Medium", "Yu Gothic", "YuGothic",
    "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    "Meiryo", sans-serif;
}

/* 再生中の musicbox 背景を透明な白に */
.musicbox.playing {
  background-color: rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s;
}

/* === WebView / アプリ検出による切替 === */
body.web .only-in-app {
  display: none;
}

body.app .only-in-web {
  display: none;
}

/* === ヘッダー（共通） === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  font-weight: bold;
  color: white;

  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);

  /* 左右の壁（PC） */
  padding: 0 20px;
  box-sizing: border-box;
}

.header_wrapper {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: 100%;
  gap: 0;
  min-width: 0;
}

/* ロゴ（左） */
.header_logo {
  display: flex;
  align-items: center;
  font-size: 20px;
  margin: 12px 0;
  font-weight: 600;
  min-width: 0;
}

.header_logo>a.appname {
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.08em;
  white-space: nowrap;
  margin-right: 15px;
}

/* ナビ（中央） */
.header_nav_scroller {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  touch-action: pan-x;
  scrollbar-width: none;

  /* PC：右に 20px */
  margin-right: 20px;
}

.header_nav_scroller::-webkit-scrollbar {
  display: none;
}

.header_nav_row {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 0;
  gap: 20px;
  /* PC */
}

.header_nav_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  flex: 0 0 92px;
  text-align: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: #fff;

  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
  z-index: 0;

  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  box-shadow:
    0 5px 20px rgba(0, 0, 0, 0.4),
    inset 0 0 10px rgba(255, 255, 255, 0.05);

  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    color 0.25s ease;

  scroll-snap-align: start;
  transform: none !important;
}

.header_nav_btn:hover {
  transform: none !important;
}

.header_nav_btn.header_nav_btn--active {
  border-color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.30);
}

/* メニュー（右）※ ここが右寄せの本命 */
.header_menu {
  display: flex;
  align-items: center;
  justify-content: center;

  /* gridの右端セルで右寄せ */
  justify-self: end;

  /* 余計な margin / 無効CSS を潰す */
  margin: 0;
  position: static;
}

.header_img {
  width: 20px !important;
  height: 20px !important;
}

/* main */
main {
  margin-bottom: 150px;
}

/* === 見出しスタイル === */
.toptitle {
  margin-top: 66px;
  font-weight: bold;
}

.secondtitle {
  margin-top: 20px;
  margin-left: 0px;
  font-weight: bold;
}

h2 {
  font-size: 26px;
  margin-bottom: 20px;
  padding-left: 20px;
  font-weight: bold;
}

h3 {
  font-size: 18px;
}

p {
  font-size: 14px;
}

.contents {
  padding-left: 20px;
}

/* === タイトル（Spotify風フェードアウト） === */
.album_title,
.single_album_title {
  font-size: 18px;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  vertical-align: bottom;
}

.album_title::after,
.single_album_title::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 30px;
  height: 100%;
  background: linear-gradient(to right, transparent, #121212);
  pointer-events: none;
}

.album_text,
.single_album_text {
  padding-top: 7px;
}

.album_p,
.single_album_p {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 3px;
}

/* === 音楽要素レイアウト === */
.album {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 20px;
  list-style: none;
  margin: 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-left: 20px;
  padding-right: 20px;
  margin-bottom: 25px;
}

.single_album {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 25px;
  gap: 20px;
  list-style: none;
  margin: 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-left: 20px;
  padding-right: 20px;
}

.album::-webkit-scrollbar,
.single_album::-webkit-scrollbar {
  display: none;
}

.album::-webkit-scrollbar-thumb,
.single_album::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.album::-webkit-scrollbar-track,
.single_album::-webkit-scrollbar-track {
  background: transparent;
}

.audio {
  margin-bottom: 25px;
}

.albumbox,
.single_albumbox {
  flex: 0 0 auto;
  min-width: 155px;
}

.album_img,
.single_album_img {
  display: block;
  width: 155px;
  height: 155px;
  border-radius: 7px;
}

.album_img {
  border: 0.5px solid rgba(255, 255, 255, 0.1);
}

.single_album_img {
  border: none;
}

.musicbox {
  padding-left: 20px;
  margin-bottom: 20px;
}

.music_img {
  width: 60px;
  height: 60px;
  border-radius: 3px;
  border: 0.1px solid rgba(255, 255, 255, 0.1);
}

.music_wrapper {
  display: flex;
  align-items: center;
}

.music_text {
  margin-top: auto;
  margin-bottom: auto;
  flex: 1;
  min-width: 0;
}

.title {
  width: 100%;
  font-size: 18px;
  margin-left: 15px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.music_p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  padding-top: 5px;
}

/* ★ 右側：お気に入り＋三点リーダーコンテナ（PC基準） */
.music_contents_img {
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: 25px;
  gap: 20px;
}

.favorite_img,
.ellipses_img {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
}

/*コントロールパネル*/
.Control_panel {
  display: flex;
  background-color: rgba(0, 0, 0, 0.9);
  padding: 15px;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.Control_img {
  width: 25px;
  height: 25px;
}

.Control_item {
  text-align: center;
  margin: 0 auto;
}

/* === ナウプレイングウィジェット（固定下部プレイヤー） === */
#nowPlayingWidget {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(50, 50, 50, 0.5);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  border: 0.5px solid rgba(255, 255, 255, 0.3);
  padding: 12px 12px;
  width: 100%;
  height: 95px;
  overflow: hidden;
  position: fixed;
  bottom: 0px;
  left: 0;
  z-index: 1;
}

.nowPlayingControls {
  display: flex;
  align-items: center !important;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  transition: none !important;
}

.nowPlayingImage {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  border-radius: 3px;
  object-fit: cover;
  display: block;
}

.nowPlayingText {
  flex-grow: 1;
  overflow: hidden;
  margin-left: 5px;
  transition: none !important;
}

.nowPlayingTitle {
  font-size: 16px;
  margin-bottom: 7px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: none !important;
}

.nowPlay_p {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: none !important;
}

.nowPlayingToggle {
  width: 35px;
  height: 35px;
  cursor: pointer;
  margin-left: 5px;
  margin-right: 5px;
}

.nowPlayingProgressWrapper {
  width: 100%;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
}

#progressBar {
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background-color: rgba(255, 255, 255, 0.3);
  appearance: none;
  outline: none;
  cursor: pointer;
  position: relative;
}

.nowPlayingToggle_np,
.nowPlayingToggle_sl {
  width: 19px;
  height: 19px;
  margin-top: auto;
  margin-bottom: auto;
  margin-left: 3px;
  margin-right: 3px;
}

/* ホバー時にだけサムを表示 */
#progressBar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  background-color: rgb(255, 255, 255);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#progressBar:hover::-webkit-slider-thumb {
  opacity: 1;
}

#progressBar::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background-color: #000000;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#progressBar:hover::-moz-range-thumb {
  opacity: 1;
}

/* bottom sheet（共通） */
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 260px;
  background-color: #000000;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bottom-sheet.show {
  transform: translateY(0);
}

.sheet-content {
  width: 100%;
  padding: 20px;
  text-align: center;
}

.menu-item {
  padding: 15px;
  font-size: 16px;
  color: white;
  cursor: pointer;
  border-bottom: 1px solid #444;
}

.menu-item:last-child {
  border-bottom: none;
  color: #ccc;
}

.menu-item:hover {
  background-color: #333;
}

.hidden {
  display: none;
}

u {
  color: #0080ff;
}

/*アルバムページ*/
.keyvisual {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: -1;
}

.main-content {
  background-color: #0a0a0a;
  padding-top: 5px;
  margin-top: 7px;
}

.albumname {
  font-size: 50px;
  padding-top: 50%;
  padding-left: 20px;
  font-weight: bold;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.45);
}

.albumtitle {
  margin-top: 15px;
}

/* フォローリスト */
.follow-list {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  padding-left: 20px;
  padding-right: 20px;
  margin-left: 0;
  margin-bottom: 25px;
  text-align: center;
  -webkit-overflow-scrolling: touch;
}

.follow-list::-webkit-scrollbar {
  display: none;
}

.follow-list a {
  flex: 0 0 auto;
}

.follow-list img {
  width: 67.5px;
  height: 67.5px;
  border: 0.1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 5px;
}

/* 戻るボタン */
.pageback {
  width: 38px;
  height: 38px;
  top: 40px;
  margin: 25px;
  position: fixed;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 100%;
}

.site_pageback {
  width: 18px !important;
  height: 18px !important;
  margin-bottom: 2.3px;
  margin-right: 6px;
}

/* li基準 */
li.musicbox {
  position: relative;
}

/* 三点リーダー共通 */
.track_ellipses_btn,
.home_track_ellipses_btn,
.album_track_ellipses_btn,
.artist_track_ellipses_btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.track_ellipses_btn img,
.home_track_ellipses_btn img,
.album_track_ellipses_btn img,
.artist_track_ellipses_btn img {
  display: block;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* --- レスポンシブ(iPhoneX以降) --- */
@media screen and (max-width: 490px) {
  body.app header {
    padding-top: 46px;
  }

  body.app .toptitle {
    margin-top: 15px;
  }

  body.app .Control_panel {
    padding-bottom: 60px;
  }

  body.app #nowPlayingWidget {
    margin-bottom: 80px;
  }

  /* ヘッダー：左右の壁（SP 15px） */
  .header {
    padding: 0 15px;
  }

  .header_logo {
    font-size: 20px;
    margin: 10px 0;
  }

  .header_nav_scroller {
    margin-right: 15px;
  }

  .header_nav_row {
    gap: 15px;
  }

  .header_img {
    width: 18px !important;
    height: 18px !important;
  }

  main {
    padding-bottom: 0px;
  }

  .toptitle {
    margin-top: 61px;
  }

  .secondtitle {
    margin-top: 15px;
    margin-left: 0px;
    font-weight: bold;
  }

  .menu_title {
    margin-top: 55px;
  }

  #searchInput {
    margin-top: 55px;
    margin-left: 15px;
    font-size: 24px;
    font-weight: bold;
  }

  body.app #searchInput {
    margin-top: 100px;
    margin-left: 15px;
    font-size: 24px;
    font-weight: bold;
  }

  .main-content {
    padding-top: 5px;
    margin-top: 7px;
  }

  body.no-scroll {
    overflow: hidden;
    touch-action: none;
  }

  h2 {
    font-size: 24px;
    margin-bottom: 15px;
    padding-left: 15px;
  }

  h3 {
    font-size: 16px;
  }

  .contents {
    font-size: 14px;
    padding-left: 15px;
  }

  .album {
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 20px;
  }

  .single_album {
    padding-bottom: 20px;
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .albumbox,
  .single_albumbox {
    min-width: 145px;
  }

  .album_title,
  .single_album_title {
    font-size: 16px;
  }

  .album_p,
  .single_album_p {
    font-size: 8px;
    margin-top: 3px;
  }

  .album_img,
  .single_album_img {
    width: 145px;
    height: 145px;
    border-radius: 5px;
  }

  .musicbox {
    padding-left: 15px;
    margin-bottom: 15px;
  }

  .title {
    font-size: 16px;
    margin-left: 15px;
  }

  .music_p {
    font-size: 10px;
    padding-top: 3px;
  }

  .music_img {
    width: 50px;
    height: 50px;
    border-radius: 3px;
  }

  .favorite_img,
  .ellipses_img {
    width: 16px;
    height: 16px;
  }

  .music_contents_img {
    margin-right: 20px;
    gap: 15px;
  }

  .pageback {
    width: 34px;
    height: 34px;
    margin: 20px;
    top: 40px;
  }

  body.app .albumname {
    font-size: 44px;
    padding-top: 36%;
    padding-left: 15px;
    font-weight: bold;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.45);
  }

  .albumname {
    font-size: 44px;
    padding-top: 50%;
    padding-left: 15px;
    font-weight: bold;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.45);
  }

  .nowPlayingShuffle,
  .nowPlayingBack,
  .nowPlayingNext,
  .nowPlayingLoop {
    display: none;
  }

  .follow-list {
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 20px;
  }

  .Control_panel {
    background-color: rgba(0, 0, 0, 0.9);
    height: 55px;
    padding: 15px;
    gap: 35px;
  }

  #nowPlayingWidget {
    height: 60px;
    padding: 5px;
    margin: 0 7px 65px;
    width: calc(100% - 14px);
    border-radius: 7px;
  }

  .nowPlayingControls {
    gap: 7px;
  }

  .nowPlayingInfo {
    display: flex;
    align-items: center;
    gap: 7px;
  }

  .nowPlayingImage {
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    margin-bottom: -5.5px;
  }

  .nowPlayingText {
    margin-left: unset;
    height: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .nowPlayingTitle {
    font-size: 14px;
    margin-bottom: 5px;
    font-weight: normal;
  }

  .nowPlay_p {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
  }

  .nowPlayingToggle {
    width: 30px;
    height: 30px;
    margin-right: 3px;
  }

  .nowPlayingProgressWrapper {
    margin-bottom: -5.5px;
  }

  #progressBar {
    height: 2px;
  }

  .nowPlayingToggle_sl,
  .nowPlayingToggle_np {
    display: none;
    margin: unset;
    padding: unset;
  }

  .menu_list {
    font-size: 16px;
  }
}

/* --- PC版では拡張ビューを完全に非表示にする --- */
@media screen and (min-width: 490px) {
  #nowPlayingWidget {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 12px;
    width: 100%;
    height: 95px;
    overflow: hidden;
    position: fixed;
    bottom: 55px;
    left: 0;
    z-index: 1;
  }

  #expandedPlayer {
    display: none !important;
  }

  .musicbox:hover {
    background-color: rgba(255, 255, 255, 0.07);
    transition: background-color 0.3s ease;
    border-radius: 5px;
  }

  .nowPlayingControls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
  }

  .nowPlayingInfo {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 20%;
  }

  .nowPlayingButtons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 0 0 50%;
  }

  .volume-control {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex: 0 0 20%;
  }

  #volumeSlider {
    width: 100%;
    height: 3px;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.3);
    appearance: none;
    outline: none;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  #volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    background-color: #fff;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  #volumeSlider:hover::-webkit-slider-thumb {
    opacity: 1;
  }

  #volumeSlider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background-color: #fff;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  #volumeSlider:hover::-moz-range-thumb {
    opacity: 1;
  }

  .audio {
    margin-bottom: 20px;
  }
}

@media screen and (min-width: 600px) {
  .albumname {
    padding-top: 180px;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.45);
  }

  .audio {
    padding-bottom: 175px;
  }
}

/* --- PC・通常 --- */
.album_title,
.single_album_title {
  width: 155px;
}

/* --- iPhoneX以降 --- */
@media screen and (max-width: 490px) {

  .album_title,
  .single_album_title {
    width: 145px;
  }
}