/* Island Windows JA — IG reels banner + modal (Orchid Gold pattern) */
.iw-reels-banner {
  position: relative;
  min-height: clamp(280px, 42vw, 520px);
  overflow: hidden;
  background: #0a0a0a;
}
.iw-reels-banner__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.iw-reels-banner__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.2) 0%, rgba(10, 10, 10, 0.75) 100%);
  z-index: 1;
}
.iw-reels-banner__inner {
  position: relative;
  z-index: 2;
  min-height: clamp(280px, 42vw, 520px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
}
.iw-reels-banner__play {
  border: none;
  background: transparent;
  cursor: pointer;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}
.iw-reels-banner__play-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #D4AF37;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 40px rgba(212, 175, 55, 0.35);
  position: relative;
}
.iw-reels-banner__play-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-38%, -50%);
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #0a0a0a;
}
.iw-reels-banner__label {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}
.iw-reels-banner__count {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 0.35rem;
}

html.iw-reels-modal-open,
body.iw-reels-modal-open {
  overflow: hidden !important;
  height: 100%;
}
body.iw-reels-modal-open {
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
  touch-action: none;
}

.iw-reels-modal {
  position: fixed;
  inset: 0;
  z-index: 10120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
}
.iw-reels-modal[hidden] {
  display: none !important;
}
.iw-reels-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.88);
}
.iw-reels-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1180px, 96vw);
  max-height: min(94vh, 980px);
  height: min(94vh, 980px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #0a0a0a;
  border-radius: 14px;
  padding: clamp(1.2rem, 3vw, 2rem);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(212, 175, 55, 0.25);
}
.iw-reels-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.2);
  color: #0a0a0a;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.iw-reels-modal__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  color: #0a0a0a;
}
.iw-reels-modal__title span {
  color: #D4AF37;
}
.iw-reels-modal__lead {
  margin: 0 0 0.75rem;
  color: rgba(10, 10, 10, 0.72);
}
.iw-reels-modal__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}
.iw-reels-filter {
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: #fff;
  color: #0a0a0a;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.iw-reels-filter.is-active {
  background: #D4AF37;
  border-color: #D4AF37;
  color: #0a0a0a;
}
.iw-reels-modal__picker {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.iw-reels-modal__carousel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.85rem, 2vw, 1.15rem);
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.35rem;
}
@media (min-width: 900px) {
  .iw-reels-modal__carousel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.iw-reels-modal__card-hit {
  width: 100%;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  overflow: hidden;
  background: #faf8f4;
  cursor: pointer;
  text-align: left;
  padding: 0;
  display: block;
}
.iw-reels-modal__card-hit:hover,
.iw-reels-modal__card-hit:focus-visible {
  border-color: #D4AF37;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  outline: none;
}
.iw-reels-modal__thumb {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #111;
}
.iw-reels-modal__thumb img,
.iw-reels-modal__thumb-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.iw-reels-modal__thumb-video {
  opacity: 0;
  transition: opacity 0.2s;
}
.iw-reels-modal__card-hit:hover .iw-reels-modal__thumb-video,
.iw-reels-modal__card-hit:focus-visible .iw-reels-modal__thumb-video {
  opacity: 1;
}
.iw-reels-modal__thumb-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}
.iw-reels-modal__thumb-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.92);
}
.iw-reels-modal__thumb-play::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-36%, -50%);
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent #0a0a0a;
}
.iw-reels-modal__card-body {
  display: block;
  padding: 0.65rem 0.75rem 0.8rem;
}
.iw-reels-modal__card-title {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: #0a0a0a;
}
.iw-reels-modal__card-desc {
  display: block;
  font-size: 0.78rem;
  color: rgba(10, 10, 10, 0.65);
  margin-top: 0.15rem;
}
.iw-reels-modal__player {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}
.iw-reels-modal__player[hidden] {
  display: none !important;
}
.iw-reels-modal__player-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.iw-reels-modal__back {
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.iw-reels-modal__now-title {
  margin: 0;
  font-size: 1.1rem;
}
.iw-reels-modal__video {
  width: 100%;
  max-height: min(62vh, 640px);
  background: #000;
  border-radius: 10px;
}
.iw-reels-modal__now-desc {
  margin: 0.75rem 0 0;
  color: rgba(10, 10, 10, 0.72);
}
.iw-reels-modal__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.iw-reels-modal__tool {
  border: 1px solid #0a0a0a;
  background: #fff;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font-weight: 600;
  cursor: pointer;
}
.iw-reels-modal__tool--primary {
  background: #D4AF37;
  border-color: #D4AF37;
  color: #0a0a0a;
}
.iw-reels-modal__tool:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

html[data-theme="dark"] .iw-reels-modal__dialog {
  background: #12151a;
  color: #f0f0f0;
}
html[data-theme="dark"] .iw-reels-modal__title,
html[data-theme="dark"] .iw-reels-modal__card-title,
html[data-theme="dark"] .iw-reels-modal__now-title {
  color: #fff;
}
html[data-theme="dark"] .iw-reels-modal__lead,
html[data-theme="dark"] .iw-reels-modal__card-desc,
html[data-theme="dark"] .iw-reels-modal__now-desc {
  color: rgba(240, 240, 240, 0.72);
}
html[data-theme="dark"] .iw-reels-modal__card-hit {
  background: #0d1014;
}
html[data-theme="dark"] .iw-reels-filter,
html[data-theme="dark"] .iw-reels-modal__back,
html[data-theme="dark"] .iw-reels-modal__tool {
  background: #0d1014;
  color: #fff;
  border-color: rgba(212, 175, 55, 0.35);
}
