.yuka-ytgw-page,
.yuka-ytgw-search-box,
.yuka-ytgw-result-search,
.yuka-ytgw-results,
.yuka-ytgw-related,
.yuka-ytgw-search-form,
.yuka-ytgw-search-form * {
  box-sizing: border-box;
}

.yuka-ytgw-page {
  margin: 1.75rem 0;
}

.yuka-ytgw-search-box,
.yuka-ytgw-result-search,
.yuka-ytgw-results,
.yuka-ytgw-related {
  margin: 1.35rem 0;
}

.yuka-ytgw-search-box {
  padding: 1.15rem;
  border: 1px solid #e6e1da;
  border-radius: 4px;
  background: #fff;
}

.yuka-ytgw-search-box__label {
  margin: 0 0 .85rem;
  color: #4f4a45;
  font-size: .95rem;
  line-height: 1.8;
}

.yuka-ytgw-result-search {
  padding: 0;
}

.yuka-ytgw-result-search__label {
  display: block;
  margin: 0 0 .55rem;
  color: #555;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.6;
}

.yuka-ytgw-search-form {
  width: 100%;
}

.yuka-ytgw-search-form__row {
  display: flex;
  gap: .65rem;
  align-items: stretch;
  width: 100%;
}

.yuka-ytgw-search-form input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 3.05rem;
  padding: 0 .95rem;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  color: #222;
  font-size: .96rem;
  line-height: 1.4;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.yuka-ytgw-search-form input[type="search"]:focus {
  border-color: #d9291c;
  box-shadow: 0 0 0 3px rgba(217, 41, 28, .1);
}

.yuka-ytgw-search-form button {
  flex: 0 0 auto;
  min-width: 9.25rem;
  height: 3.05rem;
  padding: 0 1.05rem;
  border: 1px solid #d9291c;
  border-radius: 4px;
  background: #d9291c;
  color: #fff;
  cursor: pointer;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .02em;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.yuka-ytgw-search-form button::before {
  content: "▶";
  display: inline-block;
  margin-right: .42em;
  font-size: .76em;
  line-height: 1;
  transform: translateY(-.04em);
}

.yuka-ytgw-search-form button:hover,
.yuka-ytgw-search-form button:focus-visible {
  filter: brightness(.96);
  box-shadow: 0 6px 16px rgba(217, 41, 28, .18);
}

.yuka-ytgw-results {
  padding: 1.35rem;
  border: 1px solid #cfc9c2;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
}

.yuka-ytgw-results__lead,
.yuka-ytgw-cache-note,
.yuka-ytgw-admin-note {
  color: #5b5550;
  font-size: .9rem;
  line-height: 1.85;
}

.yuka-ytgw-results__lead {
  margin: 0 0 1.05rem;
}

.yuka-ytgw-main {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(230px, .82fr);
  gap: 1.25rem;
  align-items: center;
}

.yuka-ytgw-main__media {
  min-width: 0;
}

.yuka-ytgw-main__thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: #111;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .12);
}

.yuka-ytgw-main__thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  opacity: .95;
  transition: opacity .18s ease, transform .25s ease;
}

.yuka-ytgw-main__thumb:hover img,
.yuka-ytgw-main__thumb:focus-visible img {
  opacity: .88;
  transform: scale(1.015);
}

.yuka-ytgw-play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.9rem;
  height: 3.9rem;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: rgba(217, 41, 28, .95);
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  padding-left: .12rem;
  box-shadow: 0 9px 22px rgba(0, 0, 0, .22);
}

.yuka-ytgw-main__body {
  min-width: 0;
}

.yuka-ytgw-main__body h3 {
  margin: 0 0 .7rem;
  color: #222;
  font-size: 1.08rem;
  line-height: 1.65;
  font-weight: 700;
}

.yuka-ytgw-main__body p {
  margin: 0 0 1rem;
  color: #6a625c;
  font-size: .88rem;
  line-height: 1.65;
}

.yuka-ytgw-main__actions {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  flex-direction: column;
}

.yuka-ytgw-main__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: .5rem 1rem;
  border: 1px solid #d9291c;
  border-radius: 999px;
  background: #fff;
  color: #d9291c;
  text-decoration: none;
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.2;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.yuka-ytgw-main__link:hover,
.yuka-ytgw-main__link:focus-visible {
  background: #d9291c;
  color: #fff;
  box-shadow: 0 7px 16px rgba(217, 41, 28, .18);
}

.yuka-ytgw-external-note {
  position: relative;
  margin: 0;
  padding-left: 1.1em;
  color: #7a716a;
  font-size: .76rem;
  line-height: 1.65;
}

.yuka-ytgw-external-note::before {
  content: "↗";
  position: absolute;
  left: 0;
  top: 0;
  color: #9a9289;
  font-size: .9em;
}

.yuka-ytgw-thumbs {
  display: flex;
  gap: .75rem;
  margin-top: 1.05rem;
  overflow-x: auto;
  padding: .12rem .05rem .78rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.yuka-ytgw-thumbs::-webkit-scrollbar {
  height: 8px;
}

.yuka-ytgw-thumbs::-webkit-scrollbar-track {
  background: #f3f1ee;
  border-radius: 999px;
}

.yuka-ytgw-thumbs::-webkit-scrollbar-thumb {
  background: #cfc7bd;
  border-radius: 999px;
}

.yuka-ytgw-thumb {
  position: relative;
  display: flex;
  flex: 0 0 clamp(150px, 18vw, 190px);
  min-width: 0;
  padding: .42rem;
  border: 1px solid #e4ded7;
  border-radius: 6px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  flex-direction: column;
  gap: .46rem;
  text-align: left;
  opacity: .76;
  scroll-snap-align: start;
  transition: border-color .18s ease, box-shadow .18s ease, opacity .18s ease, transform .18s ease, background .18s ease;
}

.yuka-ytgw-thumb:hover,
.yuka-ytgw-thumb:focus-visible {
  opacity: 1;
  border-color: #cfc7bd;
  background: #fffdfb;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .08);
  transform: translateY(-1px);
}

.yuka-ytgw-thumb.is-active {
  opacity: 1;
  border-color: #cfc7bd;
  background: #fffdfb;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .1);
}

.yuka-ytgw-thumb.is-active::after {
  content: "";
  position: absolute;
  right: .48rem;
  bottom: .38rem;
  left: .48rem;
  height: 2px;
  border-radius: 999px;
  background: #d9291c;
  opacity: .86;
}

.yuka-ytgw-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 2px;
  object-fit: cover;
  background: #f2f2f2;
}

.yuka-ytgw-thumb span {
  display: -webkit-box;
  overflow: hidden;
  color: #35312e;
  font-size: .76rem;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.yuka-ytgw-iframe-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: #111;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .12);
}

.yuka-ytgw-iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.yuka-ytgw-cache-note {
  margin: .85rem 0 0;
  font-size: .78rem;
}

.yuka-ytgw-notice,
.yuka-ytgw-empty {
  padding: 1rem;
  border: 1px solid #ded8d0;
  border-radius: 4px;
  background: #fffaf3;
  color: #504942;
  line-height: 1.8;
}

.yuka-ytgw-notice p,
.yuka-ytgw-empty p {
  margin: 0;
}

.yuka-ytgw-related {
  margin-top: 1.55rem;
}

.yuka-ytgw-related__heading {
  margin: 0 0 .9rem;
  color: #222;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.6;
}

.yuka-ytgw-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .95rem;
}

.yuka-ytgw-related-card {
  display: block;
  overflow: hidden;
  border: 1px solid #ebebeb;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.yuka-ytgw-related-card:hover,
.yuka-ytgw-related-card:focus-visible {
  border-color: #d8d8d8;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .08);
  transform: translateY(-1px);
}

.yuka-ytgw-related-card__thumb {
  display: block;
  background: #f3f3f3;
}

.yuka-ytgw-related-card__thumb img,
.yuka-ytgw-related-card__thumb.is-empty {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.yuka-ytgw-related-card__title {
  display: -webkit-box;
  overflow: hidden;
  padding: .75rem .8rem .2rem;
  color: #222;
  font-size: .9rem;
  line-height: 1.65;
  font-weight: 700;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.yuka-ytgw-related-card__date {
  display: block;
  padding: 0 .8rem .8rem;
  color: #7a716a;
  font-size: .76rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .yuka-ytgw-search-form__row {
    flex-direction: column;
    gap: .55rem;
  }

  .yuka-ytgw-search-form button {
    width: 100%;
    min-width: 0;
  }

  .yuka-ytgw-results {
    padding: 1rem;
  }

  .yuka-ytgw-main {
    grid-template-columns: 1fr;
    gap: .9rem;
  }

  .yuka-ytgw-main__body h3 {
    font-size: 1rem;
  }

  .yuka-ytgw-thumbs {
    gap: .65rem;
    padding-bottom: .7rem;
  }

  .yuka-ytgw-thumb {
    flex-basis: 44%;
  }

  .yuka-ytgw-related__grid {
    grid-template-columns: 1fr 1fr;
    gap: .8rem;
  }
}

@media (max-width: 480px) {
  .yuka-ytgw-search-box,
  .yuka-ytgw-results {
    margin-right: calc(50% - 50vw + .75rem);
    margin-left: calc(50% - 50vw + .75rem);
  }

  .yuka-ytgw-thumb {
    flex-basis: 72%;
  }

  .yuka-ytgw-related__grid {
    grid-template-columns: 1fr;
  }
}

html.yuka-ytgw-modal-open {
  overflow: hidden;
}

.yuka-ytgw-modal[hidden] {
  display: none !important;
}

.yuka-ytgw-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.yuka-ytgw-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 25, 31, .62);
  backdrop-filter: blur(2px);
}

.yuka-ytgw-modal__dialog {
  position: relative;
  width: min(100%, 520px);
  padding: 2rem 2rem 1.65rem;
  border: 1px solid rgba(34, 34, 34, .14);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .22);
  color: #222;
}

.yuka-ytgw-modal__close {
  position: absolute;
  top: .85rem;
  right: .85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #f1f3f5;
  color: #5e6672;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.yuka-ytgw-modal__close:hover,
.yuka-ytgw-modal__close:focus-visible {
  background: #e7eaee;
}

.yuka-ytgw-modal__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.55rem;
  height: 2.55rem;
  margin-bottom: .85rem;
  border-radius: 999px;
  background: #fff2f0;
  color: #d9291c;
  font-size: 1.1rem;
  font-weight: 700;
}

.yuka-ytgw-modal__eyebrow {
  margin: 0 0 .35rem;
  color: #d9291c;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.yuka-ytgw-modal__title {
  margin: 0 2.25rem .65rem 0;
  color: #222;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.45;
}

.yuka-ytgw-modal__text {
  margin: 0;
  color: #59616b;
  font-size: .94rem;
  line-height: 1.85;
}

.yuka-ytgw-modal__actions {
  display: flex;
  gap: .7rem;
  align-items: center;
  justify-content: flex-start;
  margin-top: 1.35rem;
  flex-wrap: wrap;
}

.yuka-ytgw-modal__primary,
.yuka-ytgw-modal__secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: .55rem 1.15rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.yuka-ytgw-modal__primary {
  border: 1px solid #d9291c;
  background: #d9291c;
  color: #fff;
}

.yuka-ytgw-modal__primary::before {
  content: "▶";
  display: inline-block;
  margin-right: .42em;
  font-size: .76em;
  transform: translateY(-.04em);
}

.yuka-ytgw-modal__primary:hover,
.yuka-ytgw-modal__primary:focus-visible {
  color: #fff;
  box-shadow: 0 8px 20px rgba(217, 41, 28, .2);
  transform: translateY(-1px);
}

.yuka-ytgw-modal__secondary {
  border: 1px solid #d8dde5;
  background: #fff;
  color: #59616b;
}

.yuka-ytgw-modal__secondary:hover,
.yuka-ytgw-modal__secondary:focus-visible {
  border-color: #bfc7d2;
  background: #f7f8fa;
}

@media (max-width: 480px) {
  .yuka-ytgw-modal {
    align-items: flex-end;
    padding: .8rem;
  }

  .yuka-ytgw-modal__dialog {
    padding: 1.55rem 1.25rem 1.25rem;
    border-radius: 8px;
  }

  .yuka-ytgw-modal__title {
    font-size: 1.18rem;
  }

  .yuka-ytgw-modal__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .yuka-ytgw-modal__primary,
  .yuka-ytgw-modal__secondary {
    width: 100%;
  }
}

/* Featured / eyecatch variant */
.yuka-ytgw-results--featured {
  margin: 1.25rem 0;
}

.yuka-ytgw-results--featured .yuka-ytgw-main {
  align-items: center;
}

.yuka-ytgw-results--featured .yuka-ytgw-results__lead {
  margin-bottom: .95rem;
}

.yuka-ytgw-results--featured .yuka-ytgw-cache-note {
  display: none;
}

@media (max-width: 480px) {
  .yuka-ytgw-results--featured {
    margin-right: calc(50% - 50vw + .75rem);
    margin-left: calc(50% - 50vw + .75rem);
  }
}

/* External player controls */
.yuka-ytgw-player-controls {
  margin-top: .55rem;
  padding: .18rem 0 0;
}

.yuka-ytgw-player-controls[hidden] {
  display: none !important;
}

.yuka-ytgw-player-controls__buttons {
  display: flex;
  gap: .32rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.yuka-ytgw-player-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.64rem;
  padding: .2rem .44rem;
  border: 1px solid #d8d1c9;
  border-radius: 3px;
  background: #fff;
  color: #3f3833;
  cursor: pointer;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.yuka-ytgw-player-controls button:hover,
.yuka-ytgw-player-controls button:focus-visible {
  border-color: #bfb5aa;
  background: #faf7f3;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .045);
}

.yuka-ytgw-player-controls button.is-active {
  border-color: #d8d1c9;
  background: #fff;
  color: #d9291c;
  box-shadow: inset 0 -2px 0 #d9291c;
}

.yuka-ytgw-player-controls__status {
  margin: .32rem 0 0;
  color: #766d65;
  font-size: .68rem;
  line-height: 1.5;
  text-align: center;
}

.yuka-ytgw-player-controls__status:empty {
  display: none;
}

@media (max-width: 640px) {
  .yuka-ytgw-player-controls__buttons {
    justify-content: space-between;
    gap: .22rem;
    flex-wrap: nowrap;
  }

  .yuka-ytgw-player-controls button {
    min-height: 1.56rem;
    padding-right: .3rem;
    padding-left: .3rem;
    font-size: .62rem;
    letter-spacing: -.01em;
  }
}
