/* ───── Base ───── */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: #0f0f1a;
  color: #e8e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; }
button { font-family: inherit; }

/* ───── Top bar ───── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 12px max(18px, calc((100vw - 1120px) / 2));
  background: rgba(15,15,26,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.brand { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand-mark {
  width: 24px; height: 24px; border-radius: 6px;
  background: linear-gradient(135deg, #F59E0B, #8B5CF6);
  box-shadow: 0 2px 10px rgba(245,158,11,0.3);
}
.brand-name { font-size: 15px; font-weight: 700; color: #fff; }
.search {
  flex: 1; position: relative; max-width: 520px;
  display: flex; align-items: center;
  background: rgba(255,255,255,0.06);
  border-radius: 22px;
  padding: 0 14px;
}
.search:focus-within { background: rgba(255,255,255,0.1); }
.search-ic { width: 16px; height: 16px; fill: #8a8aa0; flex-shrink: 0; }
.search input {
  flex: 1; background: transparent; border: 0; outline: 0;
  padding: 8px 10px; color: #fff; font-size: 14px;
}
.search input::placeholder { color: #8a8aa0; }

/* ───── Tab bar ───── */
.tabbar {
  display: flex; gap: 4px;
  padding: 10px max(18px, calc((100vw - 1120px) / 2));
  overflow-x: auto;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.tabbar a {
  padding: 6px 14px; border-radius: 16px;
  font-size: 13px; color: #9a9ab4;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.tabbar a:hover { color: #fff; }
.tabbar a.on {
  color: #fff; background: linear-gradient(135deg, #F59E0B, #FBBF24);
  font-weight: 600;
}

/* ───── Main ───── */
.main { max-width: 1120px; margin: 0 auto; padding: 16px 18px 60px; }

/* ───── Hero ───── */
.hero {
  padding: 30px 0 20px;
  text-align: left;
}
.hero-title {
  font-size: 32px; font-weight: 900; line-height: 1.2;
  background: linear-gradient(135deg, #F59E0B, #FBBF24, #8B5CF6);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub { color: #a8a8bc; margin: 12px 0 18px; max-width: 640px; font-size: 14px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: 10px; font-weight: 600; font-size: 14px;
  border: 0; cursor: pointer; transition: transform 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: #F59E0B; color: #0f0f1a; }
.btn-primary:hover { background: #FBBF24; }
.btn-ghost { background: rgba(255,255,255,0.08); color: #e8e8f0; }
.btn-ghost:hover { background: rgba(255,255,255,0.14); }

/* ───── Block / section ───── */
.block { margin: 30px 0; }
.block-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px;
}
.block-head h2 {
  font-size: 17px; font-weight: 700; color: #fff;
  padding-left: 11px; border-left: 3px solid #F59E0B;
}
.more { font-size: 12px; color: #F59E0B; }
.more:hover { text-decoration: underline; }

/* ───── Song grid ───── */
.song-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}
.song-card {
  background: rgba(255,255,255,0.03);
  border-radius: 10px; overflow: hidden;
  transition: transform 0.15s, background 0.15s;
}
.song-card:hover {
  background: rgba(255,255,255,0.06);
  transform: translateY(-3px);
}
.song-card .thumb {
  position: relative; padding-top: 56.25%;
  background: linear-gradient(135deg, #1a1a2e, #2d1b3d);
}
.song-card .thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.song-card .play-ic {
  position: absolute; left: 8px; bottom: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,0.65); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; padding-left: 2px;
}
.song-card .dur {
  position: absolute; right: 6px; bottom: 6px;
  font-size: 11px; padding: 2px 6px; border-radius: 4px;
  background: rgba(0,0,0,0.7); color: #fff;
}
.song-card .meta { padding: 8px 10px 10px; }
.song-card .t {
  font-size: 13px; color: #e8e8f0; font-weight: 500; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.7em;
}
.song-card .a {
  margin-top: 4px; font-size: 11px; color: #8a8aa0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ───── Song list (row) ───── */
.song-list {
  display: flex; flex-direction: column;
  background: rgba(255,255,255,0.02);
  border-radius: 10px; overflow: hidden;
}
.song-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.12s;
}
.song-row:last-child { border-bottom: 0; }
.song-row:hover { background: rgba(255,255,255,0.05); }
.song-row .idx {
  width: 24px; text-align: center; color: #6a6a80;
  font-size: 13px; font-variant-numeric: tabular-nums;
}
.thumb-sm {
  width: 60px; height: 40px; border-radius: 4px;
  background: #1a1a2e; overflow: hidden; flex-shrink: 0;
}
.thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.song-row-meta { flex: 1; min-width: 0; }
.song-row-meta .t {
  color: #e8e8f0; font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.song-row-meta .a {
  color: #8a8aa0; font-size: 11px; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.song-row .dur { color: #6a6a80; font-size: 11px; font-variant-numeric: tabular-nums; }

/* ───── Playlist grid ───── */
.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.playlist-card {
  background: rgba(255,255,255,0.03);
  border-radius: 10px; overflow: hidden;
  transition: transform 0.15s, background 0.15s;
}
.playlist-card:hover { transform: translateY(-3px); background: rgba(255,255,255,0.06); }
.pl-thumb {
  aspect-ratio: 1/1;
  background: linear-gradient(135deg, #F59E0B, #8B5CF6);
}
.pl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pl-title { padding: 10px 10px 2px; font-size: 13px; color: #e8e8f0; font-weight: 500; }
.pl-count { padding: 0 10px 10px; font-size: 11px; color: #8a8aa0; }

/* ───── Artist grid ───── */
.artist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 18px;
}
.artist-card {
  text-align: center;
  transition: transform 0.15s;
}
.artist-card:hover { transform: translateY(-3px); }
.artist-avatar {
  width: 100%; aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(135deg, #1a1a2e, #2d1b3d);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.artist-avatar img { width: 100%; height: 100%; object-fit: cover; }
.artist-name {
  margin-top: 10px; font-size: 13px; color: #e8e8f0; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.artist-count { font-size: 11px; color: #8a8aa0; margin-top: 2px; }

/* ───── Chip row ───── */
.chip-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 16px 0;
}
.chip {
  padding: 6px 14px; border-radius: 18px;
  background: rgba(255,255,255,0.05); color: #b0b0c8;
  font-size: 12px;
  border: 1px solid transparent;
  transition: all 0.12s;
}
.chip:hover { background: rgba(255,255,255,0.1); color: #fff; }
.chip.on {
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
  color: #0f0f1a; font-weight: 600;
}

/* ───── Detail head ───── */
.page-head { margin: 20px 0; }
.page-head h1 { font-size: 24px; font-weight: 800; color: #fff; }
.page-head .sub { color: #a8a8bc; font-size: 13px; margin-top: 6px; }

.detail-head {
  display: flex; gap: 18px; align-items: center;
  padding: 22px 0 18px;
}
.detail-avatar, .detail-cover {
  width: 120px; height: 120px; border-radius: 14px;
  overflow: hidden; flex-shrink: 0;
  background: linear-gradient(135deg, #1a1a2e, #2d1b3d);
  box-shadow: 0 6px 22px rgba(0,0,0,0.4);
}
.detail-avatar { border-radius: 50%; }
.detail-avatar img, .detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-info h1 { font-size: 24px; font-weight: 800; color: #fff; line-height: 1.2; }
.detail-info .sub { color: #a8a8bc; font-size: 13px; margin-top: 6px; }
.detail-info .desc {
  color: #b0b0c8; font-size: 13px; margin-top: 10px; line-height: 1.6;
  max-width: 540px;
}
.detail-info .stat { color: #F59E0B; font-size: 13px; font-weight: 600; margin-top: 10px; }

/* ───── Search (big) ───── */
.search-big {
  display: flex; gap: 10px; margin: 16px 0 20px;
}
.search-big input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff; font-size: 15px; outline: 0;
}
.search-big input:focus { border-color: #F59E0B; background: rgba(255,255,255,0.08); }
.search-big button {
  padding: 0 24px; border-radius: 10px; border: 0;
  background: #F59E0B; color: #0f0f1a; font-weight: 700; cursor: pointer;
}

/* ───── Player page ───── */
.player-wrap { background: #000; margin: 0 -18px; }
.player-box {
  position: relative; width: 100%;
  padding-top: 56.25%;
  max-width: 1120px; margin: 0 auto;
}
.player-box iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.song-head { padding: 16px 0; }
.song-title { font-size: 22px; font-weight: 800; color: #fff; line-height: 1.3; }
.song-meta { color: #a8a8bc; font-size: 13px; margin-top: 8px; }
.song-meta .artist-link { color: #F59E0B; }
.song-meta .artist-link:hover { text-decoration: underline; }
.song-meta .dot { margin: 0 6px; color: #5a5a72; }
.song-actions { margin-top: 14px; display: flex; gap: 10px; }

/* ───── Ad slot ───── */
.ad-slot {
  margin: 22px 0;
  min-height: 280px;
  background: transparent;
  border: 0;
  text-align: center;
}
.ad-slot .adsbygoogle { background: transparent !important; }
.ad-label {
  font-size: 10px; color: #6a6a80;
  letter-spacing: 2px;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.ad-placeholder {
  min-height: 90px;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
}
.adsbygoogle { background: transparent !important; }

/* ───── Empty state ───── */
.empty-state {
  padding: 40px 20px; text-align: center; color: #6a6a80; font-size: 14px;
}
.empty-state.big { padding: 80px 20px; }
.empty-state h1 {
  font-size: 64px; font-weight: 900; color: #F59E0B; margin-bottom: 10px;
}
.empty-state p { margin: 0 0 20px; color: #a8a8bc; }

/* ───── Footer ───── */
.footer {
  max-width: 1120px; margin: 0 auto;
  padding: 34px 18px 40px;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 40px;
  text-align: center;
}
.foot-links {
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 16px;
}
.foot-links a { font-size: 13px; color: #8a8aa0; }
.foot-links a:hover { color: #F59E0B; }
.foot-brand {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 14px;
}
.powered-by { font-size: 11px; color: #8a8aa0; }
.yt-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 12px; background: #FF0000; border-radius: 3px;
}
.yt-play { color: #fff; font-size: 8px; line-height: 1; padding-left: 1px; }
.yt-text { color: #e8e8f0; font-size: 12px; font-weight: 600; }
.foot-copy { color: #5a5a72; font-size: 11px; display: block; }

/* ───── Install affordances ───── */
.install-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 18px;
  border: 0; cursor: pointer;
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
  color: #0f0f1a; font-size: 12px; font-weight: 700;
  white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(245,158,11,0.35);
  transition: transform 0.1s, box-shadow 0.15s;
}
.install-btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  background: #0f0f1a; border-radius: 4px; padding: 1px;
}
.install-btn-icon svg { display: block; }
.install-btn:hover { box-shadow: 0 4px 14px rgba(245,158,11,0.5); }
.install-btn:active { transform: scale(0.96); }
.install-btn[hidden] { display: none !important; }

.install-banner {
  max-width: 1120px; margin: 16px auto 0;
  padding: 0 18px;
}
.install-banner[hidden] { display: none !important; }
.install-banner-inner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(139,92,246,0.12));
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 14px;
}
.install-icon {
  flex-shrink: 0; width: 44px; height: 44px;
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.install-icon img { width: 100%; height: 100%; display: block; }
.install-text { flex: 1; min-width: 0; }
.install-title { color: #fff; font-size: 14px; font-weight: 700; }
.install-sub { color: #a8a8bc; font-size: 12px; margin-top: 2px; }
.install-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 8px; }

/* iOS install instruction modal */
.ios-modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px;
}
.ios-modal[hidden] { display: none !important; }
.ios-modal-inner {
  width: 100%; max-width: 420px;
  padding: 22px 20px 18px;
  background: #1a1a2e; border-radius: 16px 16px 0 0;
  color: #e8e8f0;
  animation: ios-slide-up 0.25s ease-out;
}
@keyframes ios-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.ios-modal-inner h3 { font-size: 16px; margin-bottom: 14px; }
.ios-modal-inner ol {
  padding-left: 22px; margin: 0 0 18px;
  color: #b0b0c8; font-size: 13px; line-height: 1.9;
}
.ios-modal-inner b { color: #fff; }
.ios-ic {
  display: inline-block; width: 18px; height: 18px;
  background: #F59E0B; color: #0f0f1a;
  border-radius: 4px; text-align: center; font-weight: 700;
  line-height: 18px;
}
@media (min-width: 640px) {
  .ios-modal { align-items: center; }
  .ios-modal-inner { border-radius: 16px; }
}

/* ───── Bottom CTA banner (every page) ───── */
.bottom-cta {
  margin: 40px 0 0;
  padding: 0 18px;
}
.bottom-cta[hidden] { display: none !important; }
.bottom-cta-inner {
  max-width: 1120px; margin: 0 auto;
  position: relative;
  display: flex; align-items: center; gap: 22px;
  padding: 28px 32px;
  background:
    radial-gradient(circle at 100% 0%, rgba(245,158,11,0.18), transparent 60%),
    radial-gradient(circle at 0% 100%, rgba(139,92,246,0.18), transparent 60%),
    linear-gradient(135deg, #1a1a2e 0%, #2d1b3d 100%);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 18px;
  overflow: hidden;
}
.bottom-cta-inner::before {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      transparent 0,
      transparent 30px,
      rgba(255,255,255,0.015) 30px,
      rgba(255,255,255,0.015) 60px
    );
  pointer-events: none;
}
.bottom-cta-icon {
  flex-shrink: 0; width: 88px; height: 88px;
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  position: relative; z-index: 1;
}
.bottom-cta-icon img { width: 100%; height: 100%; display: block; }
.bottom-cta-text { flex: 1; min-width: 0; position: relative; z-index: 1; }
.bottom-cta-eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #FBBF24;
  padding: 4px 10px;
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 12px;
  margin-bottom: 10px;
}
.bottom-cta-title {
  font-size: 22px; font-weight: 800; color: #fff;
  line-height: 1.3; margin: 0 0 8px;
}
.bottom-cta-sub {
  font-size: 14px; color: #b0b0c8;
  line-height: 1.6; margin: 0 0 18px;
  max-width: 520px;
}

/* Google Play style button */
.btn-store {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 22px;
  background: #000; color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s, border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.btn-store:hover {
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}
.btn-store:active { transform: scale(0.97); }
.btn-store-ic {
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-store-text {
  display: flex; flex-direction: column; align-items: flex-start;
  line-height: 1.1;
}
.btn-store-eyebrow {
  font-size: 9px; font-weight: 500;
  letter-spacing: 1px; color: #b0b0c8;
}
.btn-store-name {
  font-size: 16px; font-weight: 600;
  color: #fff;
}

/* Android / desktop store modal — QR + CTA */
.store-modal-inner { text-align: center; }
.store-modal-inner h3 { margin-bottom: 8px; font-size: 17px; }
.store-modal-inner .store-sub {
  color: #a8a8bc; font-size: 13px; line-height: 1.6;
  margin: 0 0 16px;
}
.store-qr {
  display: inline-block;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 18px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.3);
}
.store-qr img { display: block; max-width: 220px; height: auto; }
.store-cta {
  display: block; width: 100%;
  margin-bottom: 10px;
  padding: 12px; font-size: 14px;
}
.store-close {
  display: block; width: 100%;
  padding: 10px; font-size: 13px;
}

/* ───── Mobile ───── */
@media (max-width: 520px) {
  .topbar { padding: 10px 14px; gap: 10px; }
  .brand-name { display: none; }
  .install-btn span { display: none; }
  .install-btn { padding: 7px 9px; }
  .hero-title { font-size: 26px; }
  .hero { padding: 20px 0 10px; }
  .detail-head { flex-direction: column; align-items: flex-start; text-align: left; gap: 14px; }
  .detail-avatar, .detail-cover { width: 100px; height: 100px; }
  .detail-info h1 { font-size: 20px; }
  .song-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .artist-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 14px; }
  .install-banner-inner { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .install-text { flex: 1 1 100%; order: 1; }
  .install-icon { order: 0; }
  .install-actions { order: 2; flex: 1 1 100%; justify-content: flex-end; }

  /* Bottom CTA — stack vertically */
  .bottom-cta { padding: 0 12px; }
  .bottom-cta-inner {
    flex-direction: column; align-items: flex-start;
    gap: 16px; padding: 22px 20px;
  }
  .bottom-cta-icon { width: 64px; height: 64px; border-radius: 14px; }
  .bottom-cta-title { font-size: 18px; }
  .bottom-cta-sub { font-size: 13px; }
  .btn-store { padding: 10px 18px; }
  .btn-store-name { font-size: 14px; }
}
