.sales-promo {
  width: min(448px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #b5a28c;
  background: #e2d7c7;
  color: #493c36;
  box-shadow: 0 24px 80px rgba(35, 25, 20, 0.3);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

.sales-promo:not([open]) { display: none; }
.sales-promo[open] { display: flex; flex-direction: column; animation: sales-promo-enter 180ms ease-out; }
.sales-promo::backdrop { background: rgba(43, 33, 27, 0.74); }
body.sales-promo-open { overflow: hidden; }
.sales-promo *, .sales-promo *::before, .sales-promo *::after { box-sizing: border-box; }
.sales-promo button { font: inherit; cursor: pointer; }
.sales-promo button:focus-visible { outline: 2px solid #b08a69; outline-offset: -5px; }

.sales-promo-heading {
  flex-shrink: 0;
  padding: 18px 22px 16px;
  background: radial-gradient(ellipse at 100% 0, #68554a, transparent 70%), #493c36;
  color: #f7efe3;
}

.sales-promo-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sales-promo-kicker { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }

.sales-promo-title {
  margin: 8px 0 6px;
  font-family: "KkuBulLim", "Pretendard", sans-serif;
  font-size: 38px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.sales-promo-description { margin: 0; font-size: 13px; line-height: 1.5; color: #e7d7c3; }
.sales-promo-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sales-rank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 14px 18px 10px; }
.sales-rank {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(73, 60, 54, 0.2);
  background: #f7f0e6;
}

.sales-rank-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sales-rank-place { font-size: 13px; font-weight: 700; color: #7d5b4c; }
.sales-rank-floor { font-size: 12px; font-weight: 500; color: #78675b; }
.sales-rank h3 { margin: 6px 0 8px; font-size: 18px; font-weight: 700; line-height: 1.3; letter-spacing: -0.04em; white-space: nowrap; }
.sales-rank-label { display: block; margin-bottom: 2px; font-size: 11px; color: #78675b; }
.sales-rank:not(.sales-rank--first) .sales-rank-sales { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
.sales-rank-amount { display: flex; align-items: baseline; gap: 3px; margin: 0; white-space: nowrap; letter-spacing: -0.04em; line-height: 1.2; }
.sales-rank-amount strong { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sales-rank-amount span { font-size: 14px; font-weight: 500; }
.sales-rank-rent { margin: 8px 0 0; padding-top: 6px; border-top: 1px solid rgba(73, 60, 54, 0.17); font-size: 12.5px; line-height: 1.5; letter-spacing: -0.035em; color: #493c36; }
.sales-rank-rent strong { font-size: 18px; font-weight: 700; color: #493c36; background: linear-gradient(transparent 64%, #dfc8ab 64%); }

.sales-rank--first {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "place sales" "name sales" "rent sales";
  gap: 2px 12px;
  padding: 12px 14px;
  background: #493c36;
  color: #f7efe3;
  border-color: #493c36;
}

.sales-rank--first .sales-rank-top { grid-area: place; justify-content: flex-start; gap: 12px; }
.sales-rank--first .sales-rank-place { color: #e7c8a7; }
.sales-rank--first .sales-rank-floor { color: #dacbb9; }
.sales-rank--first h3 { grid-area: name; margin: 2px 0 3px; font-size: 23px; }
.sales-rank--first .sales-rank-sales { grid-area: sales; align-self: center; }
.sales-rank--first .sales-rank-label { color: #dacbb9; text-align: right; }
.sales-rank--first .sales-rank-amount strong { font-size: 40px; }
.sales-rank--first .sales-rank-amount span { font-size: 15px; }
.sales-rank--first .sales-rank-rent { grid-area: rent; margin: 0; padding: 0; border: 0; color: #dacbb9; }
.sales-rank--first .sales-rank-rent strong { color: #f7efe3; background: linear-gradient(transparent 64%, #826a57 64%); }

.sales-promo-note { margin: 0; padding: 0 18px 12px; font-size: 11px; line-height: 1.6; color: #78675b; }
.sales-promo-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); flex-shrink: 0; border-top: 1px solid #b5a28c; }
.sales-promo-actions button { min-height: 46px; padding: 10px 8px; border: 0; background: #ede3d5; color: #493c36; font-size: 13px; font-weight: 500; }
.sales-promo-actions button + button { border-left: 1px solid #b5a28c; background: #493c36; color: #f7efe3; }

@keyframes sales-promo-enter { from { transform: translateY(6px); } to { transform: translateY(0); } }

@media (max-width: 480px) {
  .sales-promo { width: min(382px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
  .sales-promo-heading { padding: 14px 18px 12px; }
  .sales-promo-title { font-size: 32px; }
  .sales-rank-grid { gap: 8px; padding: 12px 14px 8px; }
  .sales-rank { padding: 8px 10px; }
  .sales-rank h3 { margin: 4px 0; font-size: 17px; }
  .sales-rank-amount strong { font-size: clamp(24px, 7vw, 30px); }
  .sales-rank-amount span { font-size: 12px; }
  .sales-rank-rent { margin-top: 4px; padding-top: 5px; }
  .sales-rank--first { padding: 10px 12px; gap: 2px 10px; }
  .sales-rank--first h3 { font-size: 20px; }
  .sales-rank--first .sales-rank-amount strong { font-size: clamp(30px, 9vw, 38px); }
  .sales-rank--first .sales-rank-amount span { font-size: 13px; }
  .sales-promo-note { padding: 0 14px 10px; }
}

@media (max-height: 680px) and (max-width: 480px) {
  .sales-promo-heading { padding: 14px 18px 12px; }
  .sales-promo-title { margin: 8px 0 5px; font-size: 30px; }
  .sales-rank-grid { gap: 8px; padding: 10px 14px 8px; }
  .sales-rank { padding: 6px 10px; }
  .sales-rank h3 { margin: 5px 0; }
  .sales-rank-rent { margin-top: 5px; padding-top: 4px; }
  .sales-rank--first h3 { margin: 2px 0 3px; }
  .sales-rank--first .sales-rank-rent { margin: 0; padding: 0; }
  .sales-rank-rent strong { font-size: 16px; }
  .sales-promo-note { padding-bottom: 10px; }
}

@media (max-height: 540px) and (min-width: 560px) {
  .sales-promo { width: min(620px, calc(100vw - 32px)); }
  .sales-promo-heading { padding: 8px 20px; }
  .sales-promo-title { margin: 5px 0 0; font-size: 26px; }
  .sales-promo-description { display: none; }
  .sales-rank-grid { grid-template-columns: 1fr; gap: 6px; padding: 10px 18px; }
  .sales-rank, .sales-rank--first { display: grid; grid-template-columns: 66px minmax(0, 1fr) auto; grid-template-areas: "place name sales" "place rent sales"; gap: 2px 12px; padding: 7px 12px; }
  .sales-rank-top, .sales-rank--first .sales-rank-top { grid-area: place; flex-direction: column; justify-content: center; gap: 1px; }
  .sales-rank h3, .sales-rank--first h3 { grid-area: name; margin: 0; font-size: 17px; }
  .sales-rank-sales { grid-area: sales; align-self: center; }
  .sales-rank-label, .sales-rank--first .sales-rank-label { display: none; }
  .sales-rank-amount strong, .sales-rank--first .sales-rank-amount strong { font-size: 28px; }
  .sales-rank-rent, .sales-rank--first .sales-rank-rent { grid-area: rent; margin: 0; padding: 0; border: 0; }
  .sales-rank-rent, .sales-rank--first .sales-rank-rent { font-size: 11px; line-height: 1.3; }
  .sales-rank-rent strong { font-size: 14px; }
  .sales-promo-note { padding-bottom: 8px; }
  .sales-promo-actions button { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) { .sales-promo[open] { animation: none; } }

body.hoco-notices-open { overflow: hidden; }
.hoco-promo-layer {
  position: fixed;
  inset: 0;
  z-index: 170;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background: rgba(43, 33, 27, 0.74);
}
.hoco-promo-layer[hidden] { display: none !important; }
.hoco-promo-grid { display: flex; align-items: flex-start; justify-content: center; gap: 24px; width: min(920px, 100%); max-width: 100%; margin: auto; }
.hoco-promo-grid .sales-promo {
  position: relative;
  inset: auto;
  flex: 0 1 448px;
  min-width: 0;
  width: 448px;
  margin: 0;
  max-height: calc(100dvh - 48px);
  animation: none;
}
.hoco-promo-grid > .franchise-promo-popup {
  position: relative;
  inset: auto;
  z-index: auto;
  display: block;
  flex: 0 1 448px;
  width: 448px;
  height: auto;
  min-width: 0;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  opacity: 1;
  pointer-events: auto;
  transition: none;
}
.hoco-promo-grid > .franchise-promo-popup[hidden] { display: none; }
.hoco-promo-grid .franchise-promo-dialog {
  width: 100%;
  max-height: calc(100dvh - 48px);
  background-color: #e2d7c7;
  transform: none !important;
  transition: none;
}
.hoco-promo-grid .franchise-promo-inner { display: flex; flex-direction: column; gap: 0; padding: 0; max-height: calc(100dvh - 50px); }
.hoco-benefits-content { display: grid; min-height: 0; gap: 18px; padding: 24px; overflow-y: auto; overscroll-behavior: contain; }
.hoco-promo-grid .franchise-promo-actions { flex-shrink: 0; margin: 0; padding: 12px 18px; background: #e2d7c7; border-top: 1px solid rgba(73, 60, 54, 0.18); }

@media (max-width: 720px), (max-width: 979px) and (hover: none) and (pointer: coarse) {
  .hoco-promo-layer { display: grid; overflow: hidden; padding: max(16px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .hoco-promo-layer.is-single { display: grid; }
  .hoco-promo-grid { flex-direction: column; align-items: stretch; width: min(382px, 100%); gap: 18px; margin: 0 auto; }
  .hoco-promo-layer.is-single .hoco-promo-grid { margin: auto; }
  .hoco-promo-grid .sales-promo, .hoco-promo-grid > .franchise-promo-popup { flex: none; width: 100%; max-height: calc(100dvh - 32px); }
  .hoco-promo-grid .franchise-promo-dialog { max-height: calc(100dvh - 32px); }
  .hoco-promo-grid .franchise-promo-inner { max-height: calc(100dvh - 34px); }
  .hoco-benefits-content { gap: 11px; padding: 18px 17px; }
}

@media (max-height: 680px) {
  .hoco-benefits-content { gap: 9px; padding: 14px 17px; }
}
