/* ========================================
   index page only
   top page 専用スタイル
======================================== */

.top-page {
  --index-border-color: var(--border-color, #e7e7e7);
  --index-text-main: var(--text-main, #222222);
  --index-text-sub: var(--text-sub, #666666);
  --index-bg-soft: var(--bg-soft, #fafafa);
  --index-bg-history: var(--bg-history, #efefef);
  --index-shadow-soft: var(--shadow-soft, 0 8px 20px rgba(0, 0, 0, 0.06));
  --index-radius-m: var(--radius-m, 14px);
  --index-radius-l: var(--radius-l, 20px);

  --index-signboard-action-right: 14px;
  --index-signboard-action-bottom: 14px;
  --index-hero-pointer-size: 52px;
  --index-hero-pointer-right: -12px;
  --index-hero-pointer-bottom: -16px;
}

/* ========================================
   section heading
======================================== */

/*
.section-heading {
  margin-bottom: 10px;
}

.section-heading h1,
.section-heading h2 {
  font-size: 18px;
  line-height: 1.3;
}

.section-heading p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--index-text-sub);
}
*/

.section-heading {
  margin-bottom: 10px;
}

.section-heading h1,
.section-heading h2 {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.section-heading p {
  margin-top: 4px;
  font-size: 10px;
  color: var(--index-text-sub);
  line-height: 1.4;
}


/* ========================================
   signboard
======================================== */
.top-signboard {
  position: relative;
}

.signboard-visual {
  position: relative;
  border-radius: var(--index-radius-l);
  overflow: hidden;
  box-shadow: var(--index-shadow-soft);
}

.signboard-banner {
  width: 100%;
  height: auto;
}

.signboard-action {
  position: absolute;
  right: var(--index-signboard-action-right);
  bottom: var(--index-signboard-action-bottom);
  z-index: 2;
  transform-origin: right bottom;
}

.hero-play-button {
  position: relative;
  min-width: 168px;
  height: 52px;
  padding: 0 42px 0 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--index-text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
  overflow: visible;
}

.hero-play-icon,
.hero-play-label {
  position: relative;
  z-index: 2;
}

.hero-play-icon {
  font-size: 16px;
  line-height: 1;
}

.hero-play-label {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.hero-pointer {
  position: absolute;
  right: var(--index-hero-pointer-right);
  bottom: var(--index-hero-pointer-bottom);
  z-index: 1;
  width: var(--index-hero-pointer-size);
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
}

.signboard-copy {
  margin-top: 10px;
}

body[data-top-wait-ui="dismissed"] .signboard-action {
  display: none;
}

.subtle-copy + .subtle-copy {
  margin-top: 2px;
}

/*
h1.subtle-copy {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

p.subtle-copy {
  font-size: 12px;
  color: var(--index-text-sub);
  line-height: 1.4;
}
*/

h1.subtle-copy {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

p.subtle-copy {
  font-size: 10px;
  color: var(--index-text-sub);
  line-height: 1.4;
}


/* ========================================
   top player
======================================== */
.top-player {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px;
  border: 1px solid var(--index-border-color);
  border-radius: var(--index-radius-l);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--index-shadow-soft);
  backdrop-filter: blur(8px);
}

.top-player-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-player-artwork {
  width: 84px;
  height: 84px;
  border-radius: 16px;
  overflow: hidden;
  background: #dddddd;
  flex: 0 0 auto;
}

.top-player-artwork-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-player-meta {
  min-width: 0;
  flex: 1;
}

.top-player-kicker {
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--index-text-sub);
}

.top-player-filename {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-player-progress {
  margin-top: 10px;
}

.top-player-controls {
  margin-top: 12px;
}

.top-player-transport {
  gap: 8px;
  flex-wrap: wrap;
}

.top-player-transport button {
  min-width: 88px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--index-border-color);
  border-radius: 999px;
  background: #ffffff;
  color: var(--index-text-main);
  transition:
    background-color 0.12s ease,
    color 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

body[data-transport-ui-state="playing"] .top-player-transport button[data-action="play"],
body[data-transport-ui-state="paused"] .top-player-transport button[data-action="pause"],
body[data-transport-skip-flash="1"] .top-player-transport button[data-action="skip"] {
  background: #222222;
  color: #ffffff;
  border-color: #222222;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

/* ========================================
   length selector
======================================== */
.length-grid {
  display: grid;
  grid-template-columns: repeat(3, 220px);
  gap: 12px;
  justify-content: space-between;
}

.length-button {
  position: relative;
  width: 220px;
  aspect-ratio: 220 / 85;
  border: 1px solid var(--index-border-color);
  border-radius: 18px;
  background: var(--index-bg-soft);
  box-shadow: var(--index-shadow-soft);
  overflow: hidden;
  display: block;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.length-button:hover,
.length-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.length-button:focus-visible {
  outline: 2px solid #222222;
  outline-offset: 2px;
}

.length-button-fallback,
.length-button-image {
  position: absolute;
  inset: 0;
}

.length-button-fallback {
  padding: 14px 16px;
  background: #f3f3f3;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.length-button-sec {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  color: #222222;
}

.length-button-label {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.3;
  color: #555555;
}

.length-button-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========================================
   history
======================================== */
.top-history {
  padding-bottom: 8px;
}

.history-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.history-item {
  width: 84px;
  height: 84px;
  border: 1px solid var(--index-border-color);
  border-radius: 16px;
  background: var(--index-bg-history);
  flex: 0 0 auto;
}

/* ========================================
   responsive
======================================== */
@media (max-width: 760px) {
  .length-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .length-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .top-page {
    padding: 12px;

    --index-signboard-action-right: 10px;
    --index-signboard-action-bottom: 16px;
    --index-hero-pointer-size: 38px;
    --index-hero-pointer-right: -2px;
    --index-hero-pointer-bottom: -24px;
  }

  .signboard-action {
    transform: scale(0.72);
  }

  .hero-play-button {
    min-width: 138px;
    height: 46px;
    padding: 0 24px 0 12px;
    gap: 8px;
  }

  .hero-play-label {
    font-size: 13px;
  }

  .top-player-main {
    align-items: flex-start;
  }

  .top-player-artwork {
    width: 72px;
    height: 72px;
  }

  .top-player-transport button {
    flex: 1 1 auto;
  }

  .length-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    justify-content: stretch;
  }

  .length-button {
    width: 100%;
    border-radius: 14px;
  }

  .length-button-fallback {
    padding: 10px 10px;
  }

  .length-button-sec {
    font-size: clamp(14px, 5.6vw, 18px);
  }

  .length-button-label {
    margin-top: 2px;
    font-size: clamp(9px, 2.9vw, 11px);
    line-height: 1.2;
  }
}

@media (max-width: 360px) {
  .length-grid {
    gap: 6px;
  }

  .length-button {
    border-radius: 12px;
  }

  .length-button-fallback {
    padding: 8px 8px;
  }

  .length-button-sec {
    font-size: clamp(13px, 5.8vw, 16px);
  }

  .length-button-label {
    font-size: clamp(8px, 2.8vw, 10px);
  }
}

