* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #d3b473;
  color: #2d211a;
  font-family: YuGothic, "Yu Gothic", "Hiragino Sans", Meiryo, sans-serif;
}

a {
  color: inherit;
}

.movie-page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #6b392e;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 0.95;
}

.home-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 3px double #3e2920;
  background: #efdaa2;
  color: #5c1f18;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 4px 4px 0 rgba(76, 52, 39, 0.28);
}

.home-link:hover,
.home-link:focus-visible {
  background: #ffeeb8;
}

.player-section,
.playlist-section,
.other-section {
  border: 3px solid rgba(62, 41, 32, 0.75);
  background: rgba(255, 244, 204, 0.76);
}

.player-section {
  padding: 18px;
}

.player-frame {
  position: relative;
  width: min(100%, 430px);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  overflow: hidden;
  background: #14100d;
}

#player,
#player iframe {
  width: 100%;
  height: 100%;
}

.current-info {
  padding-top: 14px;
}

.now-label {
  margin-bottom: 5px;
  color: #7e4436;
  font-size: 13px;
  font-weight: 700;
}

.current-info h2 {
  margin-bottom: 0;
  font-size: clamp(20px, 3vw, 32px);
  line-height: 1.25;
}

.playlist-section {
  margin-top: 18px;
  padding: 16px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-heading h2,
.other-section h2 {
  margin-bottom: 0;
  font-size: 24px;
}

.section-heading p {
  margin-bottom: 0;
  color: #705345;
  font-size: 14px;
}

.playlist-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.random-button {
  min-height: 38px;
  padding: 8px 14px;
  border: 2px solid rgba(62, 41, 32, 0.55);
  background: rgba(255, 252, 232, 0.86);
  color: #5c1f18;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.random-button:hover,
.random-button:focus-visible,
.random-button[aria-pressed="true"] {
  background: #fff4c9;
  border-color: #6b392e;
}

.video-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}

.video-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 92px;
  padding: 8px;
  border: 2px solid rgba(62, 41, 32, 0.32);
  background: rgba(255, 252, 232, 0.82);
  color: #2d211a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.video-item:hover,
.video-item:focus-visible,
.video-item.is-active {
  border-color: #6b392e;
  background: #fff4c9;
}

.video-item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #241b16;
}

.video-title {
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.status-message {
  min-height: 1.4em;
  margin: 12px 0 0;
  color: #7b3228;
  font-weight: 700;
}

.other-section {
  margin-top: 18px;
  padding: 18px;
}

.other-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.other-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 2px solid rgba(62, 41, 32, 0.45);
  background: rgba(255, 252, 232, 0.7);
  color: #5c1f18;
  font-weight: 700;
  text-decoration: none;
}

.other-links a:hover,
.other-links a:focus-visible {
  background: #fff4c9;
}

@media (max-width: 640px) {
  .movie-page {
    width: min(100% - 20px, 1120px);
    padding-top: 16px;
  }

  .page-header {
    align-items: start;
    flex-direction: column-reverse;
  }

  .player-section,
  .playlist-section,
  .other-section {
    padding: 10px;
  }

  .section-heading {
    display: block;
  }

  .section-heading h2 {
    margin-bottom: 4px;
  }

  .playlist-tools {
    align-items: start;
    flex-direction: column;
  }

  .video-list {
    max-height: 360px;
  }

  .video-item {
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 78px;
  }

  .video-title {
    font-size: 14px;
  }
}
