:root { color-scheme: dark; }

* {
  box-sizing: border-box;
}

body { 
  margin: 0; 
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; 
  background: #0b0f16; 
  color: #e9eef7;
  overflow-x: hidden;
}

a { color: inherit; }

/* ========== レスポンシブ対応: コンテナ ========== */
.container { 
  max-width: 1080px; 
  margin: 0 auto; 
  padding: 20px;
}

@media (max-width: 768px) {
  .container {
    padding: 12px;
  }
}
/* ================================================ */

.card { 
  background: rgba(255,255,255,.06); 
  border: 1px solid rgba(255,255,255,.08); 
  border-radius: 14px; 
  padding: 14px;
  margin-bottom: 14px;
}

@media (max-width: 768px) {
  .card {
    padding: 10px;
    border-radius: 10px;
  }
}

/* ========== レスポンシブ対応: Row ========== */
.row { 
  display: flex; 
  gap: 10px; 
  flex-wrap: wrap; 
  align-items: center;
}

@media (max-width: 768px) {
  .row {
    gap: 8px;
  }
  
  /* モバイルでは縦積み */
  .row.stack-mobile {
    flex-direction: column;
    align-items: stretch;
  }
}
/* ============================================== */

.muted { 
  opacity: .75; 
  font-size: 13px;
}

@media (max-width: 768px) {
  .muted {
    font-size: 12px;
  }
}

/* ========== レスポンシブ対応: フォーム要素 ========== */
input, select, button {
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.14);
  color: #e9eef7;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  min-width: 0;
  width: auto;
}

@media (max-width: 768px) {
  input, select, button {
    padding: 8px 10px;
    font-size: 14px;
  }
  
  /* モバイルでフル幅 */
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="password"],
  select {
    width: 100%;
  }
}

button { 
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 768px) {
  button {
    width: 100%;
  }
}
/* ==================================================== */

/* ========== レスポンシブ対応: グリッド ========== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}
/* ================================================ */

.track-card {
  display: block;
  text-decoration: none;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.track-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
  .track-card {
    border-radius: 10px;
  }
}

.track-thumb {
  aspect-ratio: 1 / 1;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.track-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.track-noimg {
  font-size: 12px;
  opacity: .65;
}

@media (max-width: 480px) {
  .track-noimg {
    font-size: 10px;
  }
}

.track-meta { 
  padding: 12px;
}

@media (max-width: 768px) {
  .track-meta {
    padding: 8px;
  }
}

.track-title { 
  font-weight: 800; 
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@media (max-width: 768px) {
  .track-title {
    font-size: 14px;
  }
}

.track-sub { 
  margin-top: 6px; 
  font-size: 12px; 
  opacity: .75; 
  display: flex; 
  gap: 10px; 
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .track-sub {
    font-size: 11px;
    gap: 6px;
  }
}

/* ========== レスポンシブ対応: タグ ========== */
.tags { 
  margin-top: 10px; 
  display: flex; 
  gap: 6px; 
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .tags {
    gap: 4px;
    margin-top: 6px;
  }
}

.tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .tag {
    font-size: 10px;
    padding: 2px 7px;
  }
}
/* =============================================== */

/* ========== レスポンシブ対応: pill ========== */
.pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .pill {
    font-size: 12px;
    padding: 5px 10px;
  }
}
/* ============================================== */

/* ========== レスポンシブ対応: 見出し ========== */
h2, h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.2rem;
  }
}
/* ============================================== */

/* ========== レスポンシブ対応: 音楽プレイヤー ========== */
audio {
  width: 100%;
  max-width: 100%;
}
/* ==================================================== */

/* ========== レスポンシブ対応: テーブル ========== */
@media (max-width: 768px) {
  table {
    font-size: 13px;
  }
  
  th, td {
    padding: 8px 4px;
  }
}
/* ================================================ */

/* ========== スクロール可能な要素 ========== */
@media (max-width: 768px) {
  .scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
/* ========================================== */

/* ========== ユーティリティクラス ========== */
.hide-mobile {
  display: block;
}

@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

.show-mobile {
  display: none;
}

@media (max-width: 768px) {
  .show-mobile {
    display: block !important;
  }
}
/* ========================================== */

/* ========== 危険ボタン ========== */
.danger {
  background: rgba(244, 67, 54, 0.2);
  border-color: rgba(244, 67, 54, 0.4);
}

.danger:hover {
  background: rgba(244, 67, 54, 0.3);
}
/* ================================ */

/* ========== hr（区切り線） ========== */
.hr {
  height: 1px;
  background: rgba(255,255,255,.08);
  margin: 14px 0;
}
/* =================================== */
