*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #c8c8c8;
  background: #111;
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.125rem);
  line-height: 1.6;
}

main {
  width: min(100% - 2rem, 54rem);
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.intro {
  margin: 0 0 20vh;
}

h1 {
  margin: 0;
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.75rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #e8e8e8;
}

.updated {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: #555;
}

.search {
  position: relative;
  display: block;
  margin-top: 1.25rem;
  max-width: 12rem;
}

.search input {
  width: 100%;
  margin: 0;
  padding: 0.2rem 1.4rem 0.2rem 0;
  border: 0;
  border-bottom: 1px solid #2a2a2a;
  border-radius: 0;
  background: transparent;
  color: #777;
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  outline: none;
}

.search input::-webkit-search-decoration,
.search input::-webkit-search-cancel-button,
.search input::-webkit-search-results-button,
.search input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.search input::placeholder {
  color: #444;
}

.search input:focus {
  border-bottom-color: #555;
  color: #a8a8a8;
}

.search-clear {
  position: absolute;
  right: 0;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #555;
  cursor: pointer;
  transform: translateY(-50%);
}

.search-clear[hidden] {
  display: none;
}

.search-clear:hover,
.search-clear:focus-visible {
  color: #999;
}

.icon-x {
  width: 0.85em;
  height: 0.85em;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

section {
  margin-bottom: 2.5rem;
}

section[hidden] {
  display: none;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
}

.section-links {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-left: 0.85rem;
  border-left: 1px solid #2f2f2f;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #666;
}

.section-link,
.see-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  line-height: 1;
}

.section-link {
  font-size: 0.75rem;
  color: #666;
  text-decoration: none;
  white-space: nowrap;
}

.icon-external {
  width: 0.85em;
  height: 0.85em;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  color: #555;
  transform: translateY(0.02em);
}

.section-link:hover,
.section-link:focus-visible {
  color: #a8a8a8;
}

.section-link:hover .icon-external,
.section-link:focus-visible .icon-external,
.see-btn:hover .icon-external,
.see-btn:focus-visible .icon-external {
  color: #888;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #2a2a2a;
  color: #a8a8a8;
}

li:first-child {
  border-top: 1px solid #2a2a2a;
}

li[hidden] {
  display: none;
}

.track,
.game,
.link-row {
  display: grid;
  grid-template-columns: calc(11rem + 50px) minmax(0, 1fr);
  align-items: center;
  column-gap: 2.5rem;
}

.is-wide .link-row {
  grid-template-columns: minmax(16rem, 1fr) auto;
  column-gap: 1.5rem;
}

.item-info {
  min-width: 0;
}

.item-name {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.item-date {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: #444;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.is-wide .item-name,
.is-wide .item-date {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.player {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) 4rem;
  align-items: center;
  column-gap: 0.65rem;
  width: 100%;
  min-width: 0;
}

.play-btn {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #a8a8a8;
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}

.play-btn:hover,
.play-btn:focus-visible {
  color: #e8e8e8;
}

.game .play-btn,
.link-row .play-btn {
  justify-self: end;
  text-align: right;
}

.see-btn .icon-external {
  width: 0.9em;
  height: 0.9em;
}

.progress-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.4rem;
  align-items: center;
  column-gap: 0.5rem;
  min-width: 0;
}

.time {
  font-size: 0.75rem;
  color: #666;
  text-align: right;
}

.volume {
  width: 100%;
}

.search-empty {
  margin: 0;
  font-size: 0.8rem;
  color: #555;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  margin: 0;
  background: #2a2a2a;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  background: #2a2a2a;
}

input[type="range"]::-moz-range-track {
  height: 2px;
  background: #2a2a2a;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -4px;
  border: 0;
  border-radius: 0;
  background: #a8a8a8;
}

input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 0;
  background: #a8a8a8;
}

input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:focus-visible::-webkit-slider-thumb {
  background: #e8e8e8;
}

input[type="range"]:hover::-moz-range-thumb,
input[type="range"]:focus-visible::-moz-range-thumb {
  background: #e8e8e8;
}

.progress {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 760px) {
  body {
    font-size: 1.05rem;
    color: #d4d4d4;
  }

  main {
    width: min(100% - 1.35rem, 54rem);
    padding: 1.5rem 0 3.5rem;
  }

  .intro {
    margin: 0 0 8vh;
  }

  h1 {
    font-size: clamp(1.45rem, 7vw, 1.85rem);
    color: #f2f2f2;
  }

  .updated {
    font-size: 0.8rem;
    color: #777;
  }

  .search {
    max-width: none;
    margin-top: 1.5rem;
  }

  .search input {
    font-size: 0.95rem;
    padding: 0.45rem 1.6rem 0.45rem 0;
    color: #c8c8c8;
    border-bottom-color: #3a3a3a;
  }

  .search input::placeholder {
    color: #666;
  }

  .search input:focus {
    color: #eee;
    border-bottom-color: #777;
  }

  .search-clear {
    width: 1.4rem;
    height: 1.4rem;
    color: #888;
  }

  .icon-x {
    width: 1em;
    height: 1em;
  }

  section {
    margin-bottom: 2.4rem;
  }

  .section-head {
    align-items: flex-start;
    gap: 0.65rem 0.75rem;
    margin-bottom: 0.95rem;
  }

  h2,
  .section-head h2 {
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    color: #9a9a9a;
  }

  .section-links {
    width: 100%;
    gap: 1rem;
    padding: 0.65rem 0 0;
    border-left: 0;
    border-top: 1px solid #444;
  }

  .section-link {
    font-size: 0.85rem;
    color: #b0b0b0;
  }

  .section-link .icon-external,
  .see-btn .icon-external {
    width: 1em;
    height: 1em;
    color: #888;
  }

  li {
    padding: 1rem 0;
    border-bottom-color: #333;
    color: #d0d0d0;
  }

  li:first-child {
    border-top-color: #333;
  }

  .track,
  .game,
  .link-row,
  .is-wide .link-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 1rem;
    row-gap: 0.85rem;
  }

  .track {
    grid-template-columns: 1fr;
  }

  .track .player {
    grid-template-columns: 3.2rem minmax(0, 1fr) 3.6rem;
    column-gap: 0.7rem;
  }

  .item-name {
    font-size: 1.05rem;
    color: #ececec;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  .item-date {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #7a7a7a;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  .play-btn,
  .see-btn {
    min-height: 2.4rem;
    padding: 0.35rem 0;
    font-size: 0.95rem;
    color: #e0e0e0;
  }

  .game .play-btn,
  .link-row .play-btn {
    margin-top: 0;
    align-items: center;
  }

  .time {
    font-size: 0.8rem;
    color: #8a8a8a;
  }

  input[type="range"] {
    height: 4px;
    background: #3a3a3a;
  }

  input[type="range"]::-webkit-slider-runnable-track,
  input[type="range"]::-moz-range-track {
    height: 4px;
    background: #3a3a3a;
  }

  input[type="range"]::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    margin-top: -6px;
    background: #ddd;
  }

  input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ddd;
  }

  .search-empty {
    font-size: 0.9rem;
    color: #777;
  }
}

@media (max-width: 420px) {
  .track .player {
    grid-template-columns: 3.2rem minmax(0, 1fr);
    row-gap: 0.7rem;
  }

  .track .volume {
    grid-column: 1 / -1;
    width: 6.5rem;
  }

  .progress-wrap {
    grid-template-columns: minmax(0, 1fr) 2.4rem;
  }
}
