body {
  font-family: verdana, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #121212;
  background-image: url('bg/bg07.jpg');
  background-size: contain;
  background-repeat: repeat;
  background-position: top left;
  background-attachment: fixed;
  color: #f0f0f0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  padding: 10px 10px 80px 10px;
  margin: 0;
}

.c { margin-left: auto; margin-right: auto; text-align: center; }
.f1 { font-size: 13px; color: #ffffff; text-align: center; }
.search-wrapper { max-width: 470px; margin: 0 auto; }
.search-header-multi { display: flex; justify-content: space-between; gap: 4px; margin-bottom: 6px; }
.search-input-wrapper { display: flex; position: relative; }
.search-input-wrapper:nth-child(1),
.search-input-wrapper:nth-child(2) { flex: 36; }
.search-input-wrapper:nth-child(3) { flex: 28; }

.sdvx-search-input {
  width: 100%; font-size: 12px; padding: 4px 22px 4px 24px;
  background-color: rgba(42, 42, 42, 0.85);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23aaa'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 14z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 6px center; background-size: 14px 14px;
  border: 1px solid rgba(68, 68, 68, 0.8); color: #ffffff; border-radius: 16px;
  box-sizing: border-box; -webkit-appearance: none; appearance: none; line-height: 1.5; transition: all 0.3s ease;
}
.sdvx-search-input::placeholder { color: #ffffff; opacity: 0.7; }
.sdvx-search-input:focus {
  outline: none; border-color: #00d2ff; box-shadow: 0 0 8px rgba(0, 210, 255, 0.3);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300d2ff'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 14z'/%3E%3C/svg%3E");
}

.clear-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px;
  background: rgba(150, 150, 150, 0.5); border-radius: 50%; color: #ffffff; font-size: 14px;
  line-height: 16px; text-align: center; cursor: pointer; user-select: none; z-index: 10;
  opacity: 0; pointer-events: none; transition: all 0.2s ease;
}
.clear-btn.show { opacity: 1; pointer-events: auto; }
.clear-btn:hover { background: rgba(220, 220, 220, 0.9); color: #121212; }

.search-count-container { display: flex; width: 100%; }
.search-count {
  width: 100%; text-align: center; padding: 4px 0; font-size: 11px; color: #ffffff;
  background-color: rgba(0, 0, 0, 0.4); border-bottom: 1px solid rgba(68, 68, 68, 0.8); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}
.search-count:empty { display: none; }

.results-list {
  display: flex; flex-direction: column; background: rgba(30, 30, 30, 0.7);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(68, 68, 68, 0.8); border-radius: 10px; overflow: hidden;
}
.song-row {
  display: flex; align-items: center; padding: 1px 0; border-bottom: 1px solid rgba(42, 42, 42, 0.8);
  background-color: rgba(30, 30, 30, 0.2); min-height: 21px; box-sizing: border-box;
  opacity: 0; animation: fadeInUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.song-row:last-child { border-bottom: none; }
.song-row:hover { background-color: rgba(37, 37, 37, 0.5); }

.fav-btn {
  font-size: 14px; color: #888; margin-left: 5px; margin-right: 5px; cursor: pointer;
  user-select: none; transition: color 0.2s, transform 0.2s; flex-shrink: 0; width: 20px; text-align: center;
}
.fav-btn:hover { transform: scale(1.2); }
.fav-btn.active { color: #ffd700; }

.level-cell {
  width: 25px; height: 25px; display: flex; align-items: center; justify-content: center;
  border-radius: 2px; flex-shrink: 0; text-decoration: none; overflow: hidden;
  transition: filter 0.2s, transform 0.1s; box-sizing: border-box; background-color: transparent;
}
.level-cell img { width: 100%; height: 100%; object-fit: contain; display: block; }

.level-group-left { display: flex; gap: 1px; flex-shrink: 0; margin-right: 2px; }
.level-group-right { display: flex; gap: 1px; flex-shrink: 0; }

.title-cell { flex-grow: 1; min-width: 0; margin-right: 2px; display: flex; flex-direction: column; justify-content: center; }
.song-title { font-size: 12px; color: #ffffff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.song-artist { font-size: 10px; color: #cccccc; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.1; }

/* プロセカの難易度用フォールバックカラー */
.fallback-esy { background-color: #5bb381; color: #fff !important; font-size: 11px !important; }
.fallback-nml { background-color: #3b90cc; color: #fff !important; font-size: 11px !important; }
.fallback-hrd { background-color: #e69138; color: #fff !important; font-size: 11px !important; }
.fallback-exp { background-color: #df4b5e; color: #fff !important; font-size: 11px !important; }
.fallback-mst { background-color: #9944c6; color: #fff !important; font-size: 11px !important; }
.fallback-apd { background-color: #d63384; color: #fff !important; font-size: 11px !important; }

.search-message { text-align: center; color: #999999; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9); padding: 5px; font-size: 13px; line-height: 1.5; }
.search-message.error { color: #ff8585; }

.sheet-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.sheet-overlay.active { opacity: 1; visibility: visible; }

.bottom-sheet {
  position: fixed; bottom: 0; left: 50%; transform: translate(-50%, 100%); width: 100%; max-width: 470px;
  height: auto; max-height: 65vh; background-color: rgba(26, 26, 26, 0.75);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 16px 16px 0 0;
  box-shadow: 0 -5px 15px rgba(0,0,0,0.5); z-index: 1001; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex; flex-direction: column;
}
.bottom-sheet.active { transform: translate(-50%, 0); }
.sheet-header { padding: 5px 10px; border-bottom: 1px solid rgba(51, 51, 51, 0.5); display: flex; justify-content: center; align-items: center; background-color: rgba(34, 34, 34, 0.75); border-radius: 16px 16px 0 0; flex-shrink: 0; position: relative; }
.sheet-title-container { display: inline-flex; align-items: center; justify-content: center; position: relative; }
.sheet-title { font-size: 13px; color: #ffd700; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9); display: flex; align-items: center; }
.sheet-title::before { content: "★"; margin-right: 5px; }

.sheet-clear-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%); white-space: nowrap;
  background: rgba(220, 53, 69, 0.25); border: 1px solid rgba(220, 53, 69, 0.6); color: #ff8585;
  font-size: 11px; padding: 3px 8px; border-radius: 12px; cursor: pointer; line-height: 1.2;
  transition: all 0.2s ease; user-select: none;
}
.sheet-clear-btn:hover { background: rgba(220, 53, 69, 0.7); color: #ffffff; }
.sheet-clear-btn:active { transform: translateY(-50%) scale(0.95); }

.sheet-content { flex-shrink: 1; overflow-y: auto; padding: 0; }
#sdvxFavoritesList .song-row { min-height: 21px; padding: 1px 0; }
#sdvxFavoritesList .fav-btn { margin-left: 5px; margin-right: 5px; }
#sdvxFavoritesList .title-cell { margin-right: 2px; }

.bottom-toggle-bar {
  position: fixed; bottom: 0; left: 0; width: 100%; background-color: rgba(30, 30, 30, 0.5);
  border-top: 1px solid rgba(68, 68, 68, 0.5); padding: 10px 0; text-align: center; z-index: 999;
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); transition: transform 0.5s;
}
.bottom-toggle-bar.hidden { transform: translateY(100%); }

.toggle-btn {
  background-color: rgba(42, 42, 42, 0.7); border: 1px solid #ffd700; color: #ffd700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9); font-size: 13px; padding: 5px 10px; border-radius: 20px;
  cursor: pointer; transition: all 0.5s; outline: none;
}
.toggle-btn:active { transform: scale(0.95); }

@keyframes fadeInUp { 0% { opacity: 0; transform: translateY(15px); } 100% { opacity: 1; transform: translateY(0); } }

.load-more-text {
  margin-top: 8px; width: 100%; text-align: center; color: #999999; font-size: 13px;
  padding: 9px 0; cursor: pointer; user-select: none; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  background: rgba(30, 30, 30, 0.9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(68, 68, 68, 0.8); border-radius: 10px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  box-sizing: border-box; transition: background-color 0.2s, color 0.2s;
}
.load-more-text:hover { color: #ffffff; background-color: rgba(45, 45, 45, 0.95); }