/* Portrait footage from the King's public TikTok profile. */
#tiktok-gallery { min-width: 0; margin-top: 38px; }
.tiktok-rail {
  display: flex;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 20px;
  /* Fractional continuous movement must not snap back between animation frames. */
  scroll-snap-type: none;
  scroll-padding-inline: 4px;
  overflow-anchor: none;
  scroll-behavior: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--king-red) var(--king-grill);
  -webkit-overflow-scrolling: touch;
}
.tiktok-card {
  flex: 0 0 clamp(235px, 23vw, 300px);
  min-width: 0;
  scroll-snap-align: start;
  background: var(--king-cream);
  color: #000;
  border-radius: 14px;
  overflow: hidden;
}
.tiktok-media {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--king-grill);
  isolation: isolate;
}
.tiktok-poster, .tiktok-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.tiktok-poster { z-index: -1; opacity: .72; }
.tiktok-player { opacity: 0; background: #000; pointer-events: none; }
.tiktok-card.is-loaded .tiktok-player { opacity: 1; }
.tiktok-card.is-failed .tiktok-player { opacity: 0; }
.tiktok-media::after {
  content: '';
  position: absolute;
  inset: 65% 0 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(transparent, #0009);
}
.tiktok-sound {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  background: #000b;
  color: var(--king-cream);
  border-radius: 4px;
  font: 600 10px/1 var(--font-body);
}
.tiktok-sound svg { width: 13px; height: 13px; }
.tiktok-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  width: 48px;
  height: 48px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #000;
  background: var(--king-yellow);
  border: 1px solid var(--king-yellow);
}
.tiktok-play svg { width: 19px; height: 19px; }
.tiktok-play[aria-pressed="true"] { color: var(--king-cream); background: #000b; border-color: #fff3d67a; }
.tiktok-play:disabled { color: var(--king-cream); background: #000b; border-color: #fff3d64a; opacity: .7; }
.tiktok-state {
  position: absolute;
  bottom: 29px;
  left: 14px;
  right: 77px;
  z-index: 2;
  color: var(--king-cream);
  font: 600 12px/1.2 var(--font-body);
}
.tiktok-card.is-loaded:not(.is-failed):not(.is-blocked) .tiktok-state { display: none; }
.tiktok-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 19px 18px;
  min-height: 91px;
}
.tiktok-caption strong { display: block; font: 400 24px/1.1 var(--font-display); }
.tiktok-caption small { display: block; margin-top: 6px; font: 600 10px/1.2 var(--font-body); }
.tiktok-caption > span:last-child { font: 400 29px/1 var(--font-label); }
.tiktok-caption:hover { color: var(--king-red); }
.tiktok-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 4px;
}
.tiktok-hint { color: #fff3d6ad; font-size: 13px; line-height: 1.4; }
.tiktok-navigation { display: flex; gap: 10px; flex: none; }
.tiktok-navigation button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  background: var(--king-cream);
  color: #000;
  border-radius: 50%;
  font: 400 22px/1 var(--font-body);
}
.tiktok-navigation button:hover:not(:disabled) { background: var(--king-yellow); }
.tiktok-navigation button:disabled { opacity: .3; }
.tiktok-navigation .tiktok-toggle {
  width: auto;
  gap: 8px;
  display: inline-flex;
  padding-inline: 15px;
  color: var(--king-cream);
  background: transparent;
  border: 1px solid #fff3d65a;
  font: 600 12px/1 var(--font-label);
}
.tiktok-toggle svg { width: 15px; height: 15px; }
.tiktok-navigation .tiktok-toggle:hover:not(:disabled) { color: #000; }
@media (max-width: 540px) {
  #tiktok-gallery { margin-top: 27px; }
  .tiktok-rail { gap: 14px; padding-bottom: 17px; }
  .tiktok-card { flex-basis: 248px; }
  .tiktok-caption { padding: 16px; min-height: 82px; }
  .tiktok-caption strong { font-size: 23px; }
  .tiktok-hint { max-width: 210px; font-size: 12px; }
  .tiktok-navigation { gap: 8px; }
  .tiktok-navigation button { width: 44px; height: 44px; }
}
