:root {
  --bg: #fff7fa;
  --ink: #221016;
  --mute: #9a7384;
  --line: #f0d5e0;
  --pink: #f04b8d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.app {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  min-height: 100vh;
}

.top {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 1.2rem;
  align-items: center;
  padding: 1rem 1.4rem 0.6rem;
}

.brand-face {
  width: 56px;
  height: 56px;
  object-fit: cover;
  object-position: 50% 12%;
  border-radius: 50%;
  background: #ffd6e8;
}

h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.search input {
  width: 100%;
  max-width: 28rem;
  padding: 0.4rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.search input:focus,
.rack-item:focus-visible,
.play:focus-visible,
.deck button:focus-visible,
.dl:focus-visible,
.to-top:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

.count {
  margin: 0;
  color: var(--mute);
  font-size: 0.85rem;
}

.filters {
  display: grid;
  gap: 0.35rem;
  padding: 0.15rem 1.4rem 0.85rem;
}

.filter-row {
  display: grid;
  grid-template-columns: 4.8rem 1fr;
  gap: 0.5rem;
  align-items: center;
  min-width: 0;
}

.filter-label {
  margin: 0;
  color: var(--mute);
  font-size: 0.75rem;
}

.rack {
  display: flex;
  gap: 0.35rem;
  min-width: 0;
  overflow-x: auto;
  padding: 0;
}

.rack-item {
  flex: 0 0 auto;
  padding: 0.25rem 0.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--mute);
  font: inherit;
  cursor: pointer;
}

.rack-item.is-on {
  background: var(--pink);
  color: #fff;
}

.plate {
  display: grid;
  gap: 0.25rem;
  margin: 0 1.4rem 0.6rem;
  padding: 0.7rem 0 0.9rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

#wave {
  width: 100%;
  height: 48px;
}

.now {
  min-width: 0;
}

.now-head {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.now-kicker,
#nowMeta {
  margin: 0;
  color: var(--mute);
  font-size: 0.78rem;
}

#nowTitle {
  margin: 0.1rem 0 0.15rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.spec {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.7rem;
}

#shareUrl {
  flex: 1;
  min-width: 12rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 0.78rem;
}

.spec button,
.official {
  padding: 0.35rem 0.7rem;
  border: 0;
  background: var(--pink);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  text-decoration: none;
  cursor: pointer;
}

.save[aria-disabled="true"] {
  display: none;
}

.official[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.35;
}

#favBtn.is-on {
  background: var(--ink);
}

.hint {
  margin: 0.45rem 0 0;
  color: var(--mute);
  font-size: 0.75rem;
}

.play {
  display: inline-flex;
  flex-shrink: 0;
  gap: 0.35rem;
  align-items: center;
  height: 40px;
  padding: 0 0.9rem 0 0.7rem;
  border: 0;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.play svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.sheet {
  overflow: auto;
  min-height: 0;
}

.to-top {
  display: grid;
  place-items: center;
  position: fixed;
  right: 1.2rem;
  bottom: 5.4rem;
  z-index: 5;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
}

.to-top svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.to-top.is-show {
  opacity: 1;
  pointer-events: auto;
}

body.is-public .play,
body.is-public #wave,
body.is-public .save,
body.is-public .scrub,
body.is-public .loop,
body.is-public .vol {
  display: none;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0 0.6rem 1rem;
}

.row {
  display: grid;
  grid-template-columns: 2rem 1fr auto auto auto;
  gap: 0.8rem;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 0 0.8rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.row:hover {
  background: color-mix(in srgb, var(--pink) 8%, transparent);
}

.row.is-current {
  color: var(--pink);
}

.row-mark {
  color: var(--mute);
  font-size: 0.8rem;
  text-align: center;
}

.row.is-current .row-mark {
  color: var(--pink);
}

.row-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-source,
.row-kind {
  color: var(--mute);
  font-size: 0.75rem;
  white-space: nowrap;
}

.star {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--line);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.star.is-on {
  color: var(--pink);
}

.row.is-fav .row-title {
  font-weight: 700;
}

.empty {
  margin: 2.5rem 1.4rem;
  color: var(--mute);
}

.deck {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.2rem 0.8rem;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.deck button,
.dl {
  padding: 0.3rem 0.65rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
}

.dl {
  color: var(--pink);
}

.dl[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.35;
}

.scrub {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.5rem;
  min-width: 120px;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
}

.loop,
.vol {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--mute);
  font-size: 0.8rem;
  white-space: nowrap;
}

input[type="range"] {
  width: 100%;
  height: 2px;
  appearance: none;
  background: var(--line);
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--pink);
}

input[type="checkbox"] {
  accent-color: var(--pink);
}

@media (max-width: 720px) {
  .filter-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .top {
    grid-template-columns: auto 1fr auto;
  }

  .row {
    grid-template-columns: 1.8rem 1fr auto;
  }

  .row-source,
  .row-kind {
    display: none;
  }

  .deck {
    flex-wrap: wrap;
  }

  .to-top {
    bottom: 7.2rem;
  }
}
