/*
 * YouTube reference geometry for every home OTT card.
 * Service skins may change color and artwork, but never the card rhythm.
 */

html body .home .lowest-price-card.service-youtube {
  --reference-name-bg: #ffe9eb;
  --reference-name-border: #f4c8cc;
  --reference-name-text: #a43648;
}

html body .home .lowest-price-card.service-netflix {
  --reference-name-bg: #f8e6e7;
  --reference-name-border: #e9c5c8;
  --reference-name-text: #8b2b38;
}

html body .home .lowest-price-card.service-disney {
  --reference-name-bg: #e4f5f2;
  --reference-name-border: #c4e5df;
  --reference-name-text: #2e6d75;
}

html body .home .lowest-price-card.service-tving {
  --reference-name-bg: #fff1d9;
  --reference-name-border: #efd5a8;
  --reference-name-text: #9a5a22;
}

html body .home .lowest-price-card.service-wavve {
  --reference-name-bg: #e7f0ff;
  --reference-name-border: #c8daf5;
  --reference-name-text: #3d6098;
}

html body .home .lowest-price-card.service-watcha {
  --reference-name-bg: #f6e7f1;
  --reference-name-border: #ebcfe0;
  --reference-name-text: #934d75;
}

html body .home .lowest-price-card.service-laftel {
  --reference-name-bg: #eee9fb;
  --reference-name-border: #d9cff4;
  --reference-name-text: #68559c;
}

html body .home .lowest-price-card {
  --reference-card-padding: 9px;
  --reference-logo-size: 60px;
  --reference-label-height: 23px;
  --reference-offer-height: 164px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--reference-card-padding);
}

html body .home .lowest-price-card .lowest-price-logo {
  box-sizing: border-box;
  flex: 0 0 var(--reference-logo-size) !important;
  width: var(--reference-logo-size) !important;
  height: var(--reference-logo-size) !important;
  margin: 10px auto 0 !important;
}

html body .home .lowest-price-card .lowest-price-service-label {
  box-sizing: border-box;
  flex: 0 0 var(--reference-label-height);
  width: fit-content;
  max-width: calc(100% - 12px);
  min-height: var(--reference-label-height);
  margin: 6px auto 0 !important;
  white-space: nowrap;
}

html body .home .lowest-price-card .lowest-price-offer.lowest-price-offer--glass,
html body .home .lowest-price-card .lowest-price-offer.lowest-price-offer--airy {
  box-sizing: border-box;
  flex: 0 0 var(--reference-offer-height);
  width: 100% !important;
  height: var(--reference-offer-height);
  min-height: var(--reference-offer-height) !important;
  margin-top: auto !important;
  margin-bottom: 0 !important;
  padding: 14px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: 26px minmax(0, 1fr) 38px !important;
  align-content: stretch !important;
  gap: 0 !important;
}

html body .home .lowest-price-card
  .lowest-price-offer.lowest-price-offer--glass
  .lowest-price-offer-top,
html body .home .lowest-price-card
  .lowest-price-offer.lowest-price-offer--airy
  .lowest-price-offer-top {
  box-sizing: border-box;
  display: grid !important;
  width: 100%;
  height: 26px;
  min-width: 0;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) max-content !important;
  gap: 7px;
}

/* The discount chip always occupies the final grid column. This explicit
   end anchor keeps the right inset identical for every service and also
   wins over the legacy `em` alignment rules loaded by older card skins. */
html body .home .lowest-price-card
  .lowest-price-offer.lowest-price-offer--glass
  .lowest-price-offer-top > .lowest-price-discount,
html body .home .lowest-price-card
  .lowest-price-offer.lowest-price-offer--airy
  .lowest-price-offer-top > .lowest-price-discount {
  justify-self: end !important;
  margin-left: auto !important;
  margin-right: 0 !important;
}

/* The sample's YouTube title stays on one line. Apply the same truncation
   rule to every service so a long Korean name cannot change the row height. */
html body .home .lowest-price-card
  .lowest-price-offer.lowest-price-offer--glass
  .lowest-price-name,
html body .home .lowest-price-card
  .lowest-price-offer.lowest-price-offer--airy
  .lowest-price-name {
  display: inline-flex !important;
  min-width: 0;
  max-width: 100%;
  height: 26px !important;
  overflow: hidden;
  width: max-content !important;
  justify-self: center !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 5px;
  border: 1px solid var(--reference-name-border, rgba(126, 145, 167, .22));
  border-radius: 999px;
  color: var(--reference-name-text, #334156);
  background: var(--reference-name-bg, rgba(255, 255, 255, .76));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78);
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 16px !important;
  letter-spacing: -.055em;
  text-overflow: ellipsis;
  white-space: nowrap !important;
  word-break: keep-all;
  text-align: center;
}

/* The airy glass variant has a legacy, more-specific block rule. Keep the
   pastel service chip an inline capsule there as well. */
html body .home .lowest-price-card
  .lowest-price-offer.lowest-price-offer--glass.lowest-price-offer--airy
  .lowest-price-name {
  display: inline-flex !important;
}

html body .home .lowest-price-card
  .lowest-price-offer.lowest-price-offer--glass
  .lowest-price-discount,
html body .home .lowest-price-card
  .lowest-price-offer.lowest-price-offer--airy
  .lowest-price-discount {
  box-sizing: border-box;
  width: max-content;
  min-height: 26px;
  height: 26px;
  justify-self: end;
  margin: 0 0 0 auto !important;
  padding-inline: 8px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

html body .home .lowest-price-card .lowest-price-hero {
  box-sizing: border-box;
  display: grid;
  min-width: 0;
  height: auto;
  align-self: stretch;
  align-content: end;
  gap: 3px;
  padding: 0 0 8px;
}

html body .home .lowest-price-card .lowest-price-hero > small {
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

html body .home .lowest-price-card .lowest-price-monthly {
  display: flex;
  min-width: 0;
  align-items: baseline;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

html body .home .lowest-price-card .lowest-price-monthly small {
  margin-left: 6px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0;
}

html body .home .lowest-price-card .lowest-price-meta {
  box-sizing: border-box;
  display: grid;
  min-width: 0;
  height: 38px;
  gap: 4px;
  padding-top: 5px;
  border-top: 1px solid #e8eef4;
}

html body .home .lowest-price-card .lowest-price-regular {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 4px;
  line-height: 1.15;
}

html body .home .lowest-price-card .lowest-price-savings {
  display: block;
  min-width: 0;
  overflow: hidden;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 800px) {
  html body .home .lowest-price-card {
    --reference-offer-height: 154px;
  }

  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--glass,
  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--airy {
    padding: 13px 12px !important;
    grid-template-rows: 24px minmax(0, 1fr) 36px !important;
  }

  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--glass
    .lowest-price-offer-top,
  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--airy
    .lowest-price-offer-top {
    height: 24px;
    gap: 4px;
  }

  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--glass
    .lowest-price-name,
  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--airy
    .lowest-price-name {
    height: 24px !important;
    font-size: 11px !important;
    line-height: 13px !important;
    letter-spacing: -.07em;
    padding-inline: 3px;
  }

  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--glass
    .lowest-price-discount,
  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--airy
    .lowest-price-discount {
    min-height: 24px;
    height: 24px;
    padding-inline: 5px;
    font-size: 9px;
  }

  html body .home .lowest-price-card .lowest-price-hero {
    padding-bottom: 6px;
  }

  html body .home .lowest-price-card .lowest-price-monthly {
    font-size: 20px;
  }

  html body .home .lowest-price-card .lowest-price-monthly small {
    margin-left: 5px;
    font-size: 9.5px;
  }

  html body .home .lowest-price-card .lowest-price-meta {
    height: 36px;
  }
}

@media (max-width: 350px) {
  html body .home .lowest-price-card {
    --reference-logo-size: 48px;
    --reference-label-height: 18px;
    --reference-offer-height: 146px;
  }

  html body .home .lowest-price-card .lowest-price-logo {
    margin-top: 8px !important;
  }

  html body .home .lowest-price-card .lowest-price-service-label {
    margin-top: 3px !important;
    font-size: 7.5px;
  }

  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--glass,
  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--airy {
    padding: 12px 9px !important;
    grid-template-rows: 20px minmax(0, 1fr) 34px !important;
  }

  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--glass
    .lowest-price-offer-top,
  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--airy
    .lowest-price-offer-top {
    height: 20px;
    gap: 2px;
  }

  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--glass
    .lowest-price-name,
  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--airy
    .lowest-price-name {
    height: 20px !important;
    font-size: 10px !important;
    line-height: 11px !important;
    letter-spacing: -.1em;
    padding-inline: 2px;
  }

  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--glass
    .lowest-price-discount,
  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--airy
    .lowest-price-discount {
    min-height: 20px;
    height: 20px;
    padding-inline: 2px;
    font-size: 7.5px;
  }

  html body .home .lowest-price-card .lowest-price-hero {
    padding-bottom: 5px;
  }

  html body .home .lowest-price-card .lowest-price-monthly {
    font-size: 18px;
  }

  html body .home .lowest-price-card .lowest-price-monthly small {
    margin-left: 4px;
    font-size: 8.5px;
  }

  html body .home .lowest-price-card .lowest-price-meta {
    height: 34px;
    gap: 2px;
  }
}

/* Optical correction for the English service label: lift only the pill by
   two pixels so its white edge reads evenly against the card background. */
html body .home .lowest-price-card .lowest-price-service-label {
  position: relative;
  top: -4px !important;
}

@media (prefers-reduced-motion: reduce) {
  html body .home .lowest-price-card .lowest-price-hot {
    animation: none;
  }
}

/* Final name treatment: the price-card keeps its existing geometry while
   the Korean service name returns to plain, left-aligned text. The leading
   non-breaking space is supplied by the card markup for a small optical inset. */
html body .home .lowest-price-card
  .lowest-price-offer.lowest-price-offer--glass
  .lowest-price-name,
html body .home .lowest-price-card
  .lowest-price-offer.lowest-price-offer--airy
  .lowest-price-name,
html body .home .lowest-price-card
  .lowest-price-offer.lowest-price-offer--glass.lowest-price-offer--airy
  .lowest-price-name,
html body .home .lowest-price-card
  .lowest-price-offer
  .lowest-price-name {
  display: block !important;
  width: max-content !important;
  max-width: 100%;
  min-height: 0 !important;
  height: 16px !important;
  justify-self: start !important;
  justify-content: initial !important;
  align-items: initial !important;
  overflow: hidden;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #15171a !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left !important;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

@media (max-width: 800px) {
  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--glass .lowest-price-name,
  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--airy .lowest-price-name,
  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--glass.lowest-price-offer--airy
    .lowest-price-name,
  html body .home .lowest-price-card
    .lowest-price-offer
    .lowest-price-name {
    height: 13px !important;
  }
}

@media (max-width: 350px) {
  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--glass .lowest-price-name,
  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--airy .lowest-price-name,
  html body .home .lowest-price-card
    .lowest-price-offer.lowest-price-offer--glass.lowest-price-offer--airy
    .lowest-price-name,
  html body .home .lowest-price-card
    .lowest-price-offer
    .lowest-price-name {
    height: 11px !important;
  }
}

/* Some of the source artwork (most visibly Netflix) contains a very thin
   light edge from the original rounded screenshot.  A small proportional
   overscan keeps that baked-in edge outside the card bounds, so every OTT
   background reaches the full horizontal width without changing the card
   geometry or its content positioning. */
html body .home .lowest-price-card {
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 102% auto !important;
  background-clip: border-box !important;
}

/* Keep the home hierarchy closer to the compact OTT references: the hero
   still leads the page, while the section title stays easy to scan beside
   the cards and the “전체보기” action. */
@media (min-width: 801px) {
  html body .home .mogoo-safety-hero .safety-single h1,
  html body .home .mogoo-safety-hero .safety-single:first-child h1 {
    font-size: clamp(23px, 2.15vw, 30px) !important;
    line-height: 1.16;
  }

  html body .home .lowest-price-heading h2 {
    font-size: clamp(20px, 1.75vw, 25px) !important;
    line-height: 1.24;
  }
}

@media (max-width: 800px) {
  html body .home .mogoo-safety-hero .safety-single h1,
  html body .home .mogoo-safety-hero .safety-single:first-child h1 {
    font-size: 16px !important;
    line-height: 1.2;
  }

  html body .home .lowest-price-heading h2 {
    font-size: 18px !important;
    line-height: 1.25;
  }
}
