/* Korean Mall Home Luxury Compact V1
   Visual-only mobile refinement. Routes, wallet, API, game and claim logic are untouched. */

/* Keep the five-item navigation; remove only unnecessary blank scroll space. */
html, body { min-height:100%; }
body.km-main-five-nav {
  padding-bottom:calc(70px + env(safe-area-inset-bottom))!important;
}
#kmFiveNav {
  min-height:62px!important;
  padding:4px 6px calc(4px + env(safe-area-inset-bottom))!important;
}
#kmFiveNav a {
  padding:2px 1px!important;
  min-width:0!important;
  gap:1px!important;
}
#kmFiveNav a i {
  font-size:20px!important;
  line-height:23px!important;
}
#kmFiveNav a span {
  font-size:10px!important;
  line-height:13px!important;
  white-space:nowrap!important;
}

/* Compact homepage only; do not change Activity, Win, My or game pages. */
.km-home-root {
  min-height:0!important;
}
.km-home-premium {
  min-height:100svh!important;
  min-height:100dvh!important;
  padding-bottom:8px!important;
  overflow-x:clip!important;
  overflow-y:visible!important;
}
.km-appbar {
  height:34px!important;
  min-height:34px!important;
}
.km-header {
  height:54px!important;
  min-height:54px!important;
  padding:0 10px!important;
}
.km-crown {
  width:31px!important;
  height:31px!important;
  border-radius:11px!important;
  font-size:19px!important;
}
.km-brandline { gap:6px!important; min-width:0!important; }
.km-brandline strong { font-size:14px!important; }
.km-brandline small { font-size:7px!important; }
.km-head-actions { gap:5px!important; }
.km-wallet { padding:4px 6px 4px 4px!important; gap:4px!important; }
.km-wallet b { font-size:11px!important; }
.km-iconbtn { width:29px!important; height:29px!important; }

/* Hero: reduce the tall top block while keeping the premium pink/gold look. */
.km-hero {
  min-height:228px!important;
  grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)!important;
  border-radius:0 0 22px 22px!important;
}
.km-hero-copy { padding:15px 11px 13px!important; }
.km-kicker { font-size:8px!important; letter-spacing:1px!important; }
.km-hero h1 {
  font-size:23px!important;
  line-height:1.08!important;
  letter-spacing:-.7px!important;
  margin:7px 0!important;
}
.km-hero p {
  font-size:10px!important;
  line-height:1.4!important;
  margin:5px 0 9px!important;
}
.km-primary,.km-secondary {
  min-height:34px!important;
  padding:8px 10px!important;
  font-size:10px!important;
  border-radius:11px!important;
}
.km-trust { gap:4px!important; margin-top:7px!important; }
.km-trust span { padding:4px 5px!important; font-size:7px!important; }
.km-hero-visual { min-height:228px!important; }
.km-hero-badge { padding:6px 8px!important; }
.km-float-chip { padding:5px 7px!important; font-size:8px!important; }

/* Reduce dead space between homepage modules and cards. */
.km-quick-grid {
  gap:7px!important;
  padding:9px 9px 5px!important;
}
.km-quick {
  min-width:0!important;
  padding:9px 7px!important;
  border-radius:14px!important;
}
.km-quick b { font-size:12px!important; line-height:1.2!important; }
.km-quick small { font-size:8px!important; line-height:1.25!important; }
.qicon { width:30px!important; height:30px!important; margin-bottom:5px!important; }
.km-section {
  padding:8px 9px!important;
  margin:0!important;
}
.km-section-head { margin-bottom:8px!important; gap:6px!important; }
.km-section-head h2 { font-size:14px!important; line-height:1.2!important; }
.km-offer-grid,.km-benefit-grid,.km-game-grid { gap:7px!important; }
.km-offer,.km-benefit,.km-game,.km-activity-card,.km-promo-strip {
  border-radius:15px!important;
  padding:10px!important;
}
.km-wingo-card { border-radius:16px!important; }
.km-home-wingo-section {
  padding-top:7px!important;
  padding-bottom:7px!important;
}
.km-wingo-intro { margin:0 2px 7px!important; line-height:1.35!important; }
.km-wingo-grid { gap:7px!important; }
.km-home-partnership {
  margin:3px 9px 7px!important;
  border-radius:17px!important;
}
.km-home-partnership-inner { gap:9px!important; padding:9px 10px 9px 12px!important; }
.km-home-partnership-icon {
  width:36px!important;height:36px!important;flex-basis:36px!important;border-radius:12px!important;
}
.km-home-partnership-copy b { font-size:12px!important; }
.km-home-partnership-copy span { font-size:8px!important; line-height:1.3!important; }

/* Small phones: preserve readable labels and avoid horizontal overflow. */
@media(max-width:380px) {
  .km-appbar { height:31px!important; min-height:31px!important; }
  .km-header { height:50px!important; min-height:50px!important; padding-inline:8px!important; }
  .km-brandline strong { font-size:13px!important; }
  .km-wallet small { font-size:6px!important; }
  .km-hero { min-height:205px!important; }
  .km-hero-copy { padding:12px 9px 10px!important; }
  .km-hero h1 { font-size:20px!important; }
  .km-hero p { font-size:9px!important; }
  .km-hero-visual { min-height:205px!important; }
  .km-quick-grid { gap:5px!important; padding:7px 7px 4px!important; }
  .km-quick { padding:8px 5px!important; }
  .km-quick b { font-size:11px!important; }
  .km-quick small { font-size:7px!important; }
  .km-section { padding:7px!important; }
}
@media(prefers-reduced-motion:reduce) {
  #kmFiveNav *, .km-home-premium * { scroll-behavior:auto!important; }
}


/* Korean Mall Home Luxury Compact V2 — final mobile hero and page-height correction.
   Explicitly overrides older stacked-hero minimum heights that caused the oversized
   blank/tall area visible in the supplied phone screenshot. */
html, body {
  width:100%;
  max-width:100%;
  overflow-x:hidden!important;
}
.km-home-root {
  min-height:0!important;
  height:auto!important;
  padding-bottom:0!important;
  margin-bottom:0!important;
}
.km-home-premium {
  min-height:0!important;
  height:auto!important;
  padding-bottom:calc(62px + env(safe-area-inset-bottom))!important;
  margin-bottom:0!important;
  overflow-x:clip!important;
  overflow-y:visible!important;
}

/* Mobile header: compact, balanced, and still readable. */
@media(max-width:430px) {
  .km-appbar {
    height:28px!important;
    min-height:28px!important;
    padding:0 9px!important;
  }
  .km-app-brand img {width:23px!important;height:23px!important}
  .km-header {
    height:54px!important;
    min-height:54px!important;
    padding:0 9px!important;
  }
  .km-crown {
    width:31px!important;height:31px!important;flex:0 0 31px!important;
    border-radius:11px!important;font-size:18px!important;
  }
  .km-brandline {gap:6px!important;min-width:0!important}
  .km-brandline strong {font-size:14px!important;letter-spacing:.2px!important}
  .km-brandline small {font-size:7px!important;margin-top:1px!important}
  .km-head-actions {gap:5px!important;min-width:0!important}
  .km-wallet {padding:3px 5px 3px 3px!important;gap:4px!important}
  .km-coin {width:24px!important;height:24px!important;flex:0 0 24px!important}
  .km-wallet small {font-size:6px!important}
  .km-wallet b {font-size:10px!important}
  .km-wallet i {width:18px!important;height:18px!important;font-size:12px!important}
  .km-iconbtn {width:29px!important;height:29px!important;flex:0 0 29px!important}

  /* Main issue from screenshot: hero was inheriting a 535px minimum plus a
     350px image slide. Use a controlled image panel and natural-height copy. */
  .km-hero {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    border-radius:0 0 23px 23px!important;
    overflow:hidden!important;
  }
  .km-hero-visual {
    position:relative!important;
    display:block!important;
    width:100%!important;
    height:clamp(205px, 59vw, 255px)!important;
    min-height:clamp(205px, 59vw, 255px)!important;
    max-height:255px!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    order:0!important;
  }
  .km-hero-visual img,
  .km-hero-slide,
  .km-hero-slides img {
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    inset:0!important;
    right:auto!important;
    top:0!important;
    bottom:auto!important;
    object-fit:cover!important;
    object-position:50% 35%!important;
    mask-image:none!important;
    -webkit-mask-image:none!important;
  }
  .km-hero-visual:after {
    inset:0!important;
    background:linear-gradient(180deg,rgba(36,12,27,.02) 48%,rgba(36,12,27,.12) 100%)!important;
    pointer-events:none!important;
  }
  .km-hero-copy {
    position:relative!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:16px 15px 15px!important;
    order:1!important;
    background:linear-gradient(180deg,#fff 0%,#fffafd 100%)!important;
  }
  .km-kicker {
    font-size:8px!important;
    letter-spacing:1.2px!important;
    margin:0 0 7px!important;
  }
  .km-hero h1 {
    font-size:27px!important;
    line-height:1.08!important;
    letter-spacing:-.8px!important;
    margin:0 0 7px!important;
    text-shadow:none!important;
  }
  .km-hero h1 span {text-shadow:0 2px 12px rgba(245,27,134,.12)!important}
  .km-hero p {
    max-width:none!important;
    font-size:11px!important;
    line-height:1.45!important;
    margin:0 0 10px!important;
    color:#75666e!important;
  }
  .km-hero-actions {gap:7px!important;flex-wrap:nowrap!important}
  .km-primary,.km-secondary {
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:38px!important;
    padding:9px 13px!important;
    border-radius:12px!important;
    font-size:10px!important;
    white-space:nowrap!important;
  }
  .km-trust {
    gap:5px!important;
    margin-top:9px!important;
    line-height:1.15!important;
  }
  .km-trust span {padding:5px 7px!important;font-size:7px!important}
  .km-hero-badge {right:9px!important;top:9px!important;padding:6px 8px!important}
  .km-float-chip {padding:5px 7px!important}
  .km-slide-dots {bottom:9px!important;right:9px!important}

  /* Quick actions: four aligned compact cards without forcing the page wider. */
  .km-quick-grid {
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:6px!important;
    padding:10px 8px 5px!important;
    margin:0!important;
  }
  .km-quick {
    min-width:0!important;
    width:auto!important;
    padding:9px 3px 8px!important;
    border-radius:14px!important;
    text-align:center!important;
  }
  .qicon {
    width:31px!important;height:31px!important;
    margin:0 auto 5px!important;border-radius:11px!important;
  }
  .km-quick b {
    display:block!important;
    font-size:9px!important;
    line-height:1.15!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  .km-quick small {
    display:block!important;
    margin-top:3px!important;
    font-size:7px!important;
    line-height:1.2!important;
  }

  /* Tighten the remaining homepage flow and prevent a long empty tail. */
  .km-section {padding:8px 9px!important;margin:0!important}
  .km-section-head {margin:0 0 7px!important}
  .km-section-head h2 {font-size:16px!important;line-height:1.2!important}
  .km-offer-grid,.km-benefit-grid,.km-game-grid {gap:7px!important}
  .km-offer,.km-benefit,.km-game,.km-activity-card,.km-promo-strip {
    padding:10px!important;border-radius:15px!important;
  }
  .km-home-wingo-section {padding:7px 9px!important}
  .km-wingo-intro {margin:0 0 7px!important}
  .km-wingo-grid {gap:7px!important}
  .km-home-partnership {margin:4px 9px 8px!important}
  .km-home-partnership-inner {gap:8px!important;padding:9px 10px 9px 12px!important}
  .km-home-partnership-icon {width:36px!important;height:36px!important;flex-basis:36px!important}
  .km-home-partnership-copy b {font-size:12px!important}
  .km-home-partnership-copy span {font-size:8px!important;line-height:1.25!important}

  /* Fixed bottom nav should occupy only its real footprint. */
  .km-bottom {
    min-height:58px!important;
    height:58px!important;
    padding:4px 3px calc(4px + env(safe-area-inset-bottom))!important;
    box-sizing:border-box!important;
  }
  .km-bottom a {min-width:0!important;gap:2px!important}
  .km-bottom a i,.km-bottom a svg {font-size:19px!important}
  .km-bottom a span {font-size:10px!important;line-height:12px!important}
}
@media(max-width:360px) {
  .km-brandline strong {font-size:12px!important}
  .km-wallet {max-width:145px!important}
  .km-wallet small {font-size:5.5px!important}
  .km-hero-visual {height:205px!important;min-height:205px!important}
  .km-hero h1 {font-size:24px!important}
  .km-quick-grid {gap:4px!important;padding-inline:6px!important}
  .km-quick b {font-size:8px!important}
  .km-quick small {font-size:6px!important}
}

/* Korean Mall Home Luxury Compact V3 — remove duplicate in-page navigation and excess tail space.
   The shared five-item #kmFiveNav remains the only visible bottom navigation. */
.km-home-premium > .km-bottom {
  display:none!important;
}
.km-home-root {
  padding-bottom:0!important;
  margin-bottom:0!important;
}
.km-home-premium {
  padding-bottom:0!important;
  margin-bottom:0!important;
}
body.km-main-five-nav {
  padding-bottom:calc(66px + env(safe-area-inset-bottom))!important;
}

/* Premium mobile hero carousel: clean image framing and calm transitions. */
.km-hero-visual {
  isolation:isolate;
  background:linear-gradient(135deg,#fce7f3,#f8fafc 48%,#dbeafe);
}
.km-hero-slides {
  border-radius:inherit;
}
.km-hero-slide {
  transition:opacity .75s ease,transform 4.5s ease!important;
  will-change:opacity,transform;
}
.km-hero-slide.is-active {
  transform:scale(1.025)!important;
}
.km-slide-dots {
  padding:6px 8px!important;
  gap:5px!important;
  border:1px solid rgba(255,255,255,.28)!important;
  box-shadow:0 5px 18px rgba(28,14,31,.16)!important;
}
.km-slide-dot {width:6px!important;height:6px!important}
.km-slide-dot.active {width:17px!important}
@media(max-width:430px) {
  .km-home-premium {padding-bottom:0!important}
  .km-home-premium > .km-bottom {display:none!important}
  .km-hero-visual {
    border-radius:0!important;
    box-shadow:inset 0 -1px 0 rgba(255,255,255,.5)!important;
  }
}
@media(prefers-reduced-motion:reduce) {
  .km-hero-slide,.km-hero-slide.is-active {transition:none!important;transform:none!important}
}
