.weekly-poster-host {
  width: min(100%, 560px);
  margin: 0 auto;
}

.weekly-poster-host[data-poster-variant="detail"] {
  width: min(100%, 696px);
}

.dynamic-weekly-poster {
  --dwp-accent: #24a66a;
  overflow: hidden;
  border: 1px solid rgba(6, 61, 44, .14);
  border-radius: 22px;
  background: #fff;
  color: #1d2d28;
  box-shadow: 0 24px 64px rgba(6, 61, 44, .16);
  font-family: var(--mlb-font-thai, "Noto Sans Thai", system-ui, sans-serif);
}

.dwp-header {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 80px 20px;
  overflow: hidden;
  background-color: #bcecea;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  text-align: center;
}

.dwp-logo {
  position: absolute;
  z-index: 2;
  width: 54px;
  height: 54px;
  top: 14px;
  right: 18px;
  box-sizing: border-box;
  padding: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,.88);
  box-shadow: 0 4px 14px rgba(33,42,38,.14);
  object-fit: contain;
}

.dwp-title {
  z-index: 2;
  display: grid;
  justify-items: center;
  line-height: 1;
}

.dwp-title strong {
  color: #111;
  font-family: var(--mlb-font-display, "Baloo 2", sans-serif);
  font-size: clamp(50px, 12vw, 76px);
  font-weight: 900;
  letter-spacing: -4px;
  -webkit-text-stroke: 5px #fff;
  paint-order: stroke fill;
  filter: drop-shadow(0 7px 0 rgba(6,61,44,.15));
}

.dwp-title span {
  margin-top: -7px;
  padding: 5px 20px;
  border-radius: 99px;
  background: #e99678;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
}

.dwp-header p,
.dwp-header h2 { z-index: 2; }
.dwp-header p { margin: 13px 0 0; font-size: 13px; font-weight: 800; }
.dwp-header h2 { margin: 1px 0 0; color: #1d6548; font-size: clamp(21px, 5vw, 31px); line-height: 1.15; }

.dwp-body { display: block; background: #fff; }
.dwp-body.with-sidebar { display: grid; grid-template-columns: minmax(0, 3fr) minmax(118px, 1.12fr); }
.dwp-menu { min-width: 0; padding: 12px 13px 14px; }
.dwp-day + .dwp-day { margin-top: 12px; }

.dwp-day-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
  color: #171d1a;
  text-transform: uppercase;
}

.dwp-date { min-width: 50px; padding: 3px 7px; border-radius: 9px; background: #ffd536; text-align: center; font-size: 14px; font-weight: 900; }
.dwp-day-2 .dwp-date { background: #f7c4d7; }
.dwp-day-3 .dwp-date { background: #d8dd2a; }
.dwp-day-4 .dwp-date { background: #f3a15e; }
.dwp-day-5 .dwp-date { background: #a9e0ee; }
.dwp-day-name { font-family: var(--mlb-font-display, "Baloo 2", sans-serif); font-size: 19px; font-weight: 900; letter-spacing: .5px; }
.dwp-price-head { padding: 2px 5px; border-radius: 5px; background: #fff5c7; font-size: 8.5px; font-weight: 500; }
.dwp-dishes { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.dwp-dish { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr) 38px; align-items: start; column-gap: 8px; font-size: 12px; line-height: 1.42; }
.dwp-code { color: #44554f; font-weight: 500; white-space: nowrap; }
.dwp-dish-name { min-width: 0; display: -webkit-box; overflow: hidden; font-weight: 650; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.dwp-price { padding: 0 3px; border-radius: 3px; background: #fff8d8; text-align: right; font-weight: 500; }
.dwp-safe { display: inline-flex; margin-left: 4px; color: #0f8b68; line-height: 1; vertical-align: -2px; }
.dwp-safe-icon { width: 11px; height: 11px; filter: drop-shadow(0 1px 0 rgba(7,62,45,.14)); }
.dwp-safe-legend { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding: 6px 8px; border: 1px solid rgba(15,139,104,.2); border-radius: 7px; background: #eefaf6; color: #0b6049; font-size: 10.5px; font-weight: 800; line-height: 1.4; }
.dwp-safe-legend .dwp-safe { flex: 0 0 auto; margin-left: 0; vertical-align: 0; }
.dwp-safe-legend .dwp-safe-icon { width: 14px; height: 14px; }
.dwp-empty { padding: 8px; color: #6b7c76; text-align: center; font-size: 9px; }

.dwp-status { min-height: 36px; display: grid; place-items: center; gap: 2px; padding: 6px 10px; border-radius: 8px; text-align: center; font-size: 8px; }
.dwp-status strong { font-size: 10px; }
.dwp-status.is-closed { background: #fff0ef; color: #bf2b26; }
.dwp-status.is-coming { background: #fff7d8; color: #9a6b00; }

.dwp-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 15px 10px;
  overflow: hidden;
  background-color: var(--dwp-accent);
  background-image: url('/images/menu-posters/special-menu-sidebar-background-v1.webp');
  background-position: center top;
  background-size: cover;
  color: #073e2d;
  text-align: center;
}
.dwp-sidebar h3 { margin: 0; font-size: 13px; line-height: 1.2; }
.dwp-sidebar p { margin: 6px 0 0; font-size: 7px; line-height: 1.5; }
.dwp-special-head { flex: 0 0 auto; }
.dwp-special-items { display: grid; gap: 8px; margin: 15px 0 0; padding: 0; list-style: none; text-align: left; }
.dwp-special-items li { display: grid; gap: 2px; padding: 8px; border: 1px solid rgba(7,62,45,.12); border-radius: 8px; background: rgba(255,255,255,.82); color: #073e2d; font-size: 9.5px; line-height: 1.42; }
.dwp-special-items li > span { font-size: 11px; }
.dwp-special-items li b { color: #8a3f17; font-weight: 500; }
.dwp-special-showcase { margin: auto 0 0; padding: 8px 7px 6px; overflow: hidden; border: 1px solid rgba(7,62,45,.13); border-radius: 11px; background: rgba(255,248,238,.94); box-shadow: 0 8px 20px rgba(7,62,45,.13); }
.dwp-special-showcase img { width: 100%; height: auto; display: block; border-radius: 7px; }
.dwp-special-showcase figcaption { margin-top: 5px; color: #073e2d; font-size: 7px; font-weight: 850; line-height: 1.3; }
.dwp-promo-feature { display: flex; flex-direction: column; align-items: stretch; margin-top: 14px; padding-top: 11px; border-top: 1px solid rgba(7,62,45,.16); }
.dwp-promo-feature h4 { margin: 0; font-size: 9px; line-height: 1.3; }
.dwp-promotion img { width: 100%; max-height: 150px; margin: 10px auto 2px; object-fit: contain; }
.dwp-promo-price { display: block; margin: 7px 0; padding: 5px 4px; border-radius: 7px; background: #fff; color: #6f1c0e; font-size: 10px; line-height: 1.3; }
.dwp-promo-cta { margin-top: 9px; padding: 7px 5px; border-radius: 99px; background: #073e2d; color: #fff; text-decoration: none; font-size: 8px; font-weight: 900; }
.dwp-side-kicker { display: inline-block; margin-bottom: 6px; padding: 3px 7px; border-radius: 99px; background: #e99678; color: #fff; font-size: 7px; font-weight: 900; letter-spacing: .8px; }

.dwp-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 14px; background: #071b15; color: #fff; font-size: 8px; }
.dwp-footer strong { white-space: nowrap; }
.dwp-loading, .dwp-error { min-height: 320px; display: grid; place-content: center; gap: 7px; padding: 24px; border: 1px dashed rgba(6,61,44,.25); border-radius: 22px; background: #fff; color: #66756f; text-align: center; }
.dwp-error strong { color: #8c2c26; }

.weekly-poster-host[data-poster-variant="detail"] .dwp-dish { grid-template-columns: 49px minmax(0, 1fr) 44px; column-gap: 9px; font-size: 13.5px; }
.weekly-poster-host[data-poster-variant="detail"] .dwp-day-name { font-size: 22px; }
.weekly-poster-host[data-poster-variant="detail"] .dwp-sidebar h3 { font-size: 17px; }
.weekly-poster-host[data-poster-variant="detail"] .dwp-sidebar p,
.weekly-poster-host[data-poster-variant="detail"] .dwp-special-items li { font-size: 10.5px; }
.weekly-poster-host[data-poster-variant="detail"] .dwp-special-items li > span { font-size: 12px; }
.weekly-poster-host[data-poster-variant="detail"] .dwp-special-showcase figcaption { font-size: 8px; }

@media (min-width: 1100px) {
  .weekly-poster-host[data-poster-variant="compact"] {
    width: min(100%, 1040px);
  }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-header { min-height: 215px; }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-title strong { font-size: 84px; }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-title span { font-size: 17px; }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-header p { font-size: 15px; }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-header h2 { font-size: 35px; }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-menu { padding: 18px 20px 20px; }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-day + .dwp-day { margin-top: 16px; }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-date { min-width: 58px; font-size: 17px; }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-day-name { font-size: 25px; }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-price-head { font-size: 10.5px; }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-dish {
    grid-template-columns: 62px minmax(0, 1fr) 50px;
    column-gap: 11px;
    font-size: 17px;
    line-height: 1.45;
  }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-sidebar { padding: 20px 14px; }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-sidebar h3 { font-size: 18px; }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-sidebar p { font-size: 9px; }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-side-kicker { font-size: 9px; }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-special-items li { padding: 10px; font-size: 13.5px; }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-special-items li > span { font-size: 15px; }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-special-showcase figcaption { font-size: 9.5px; }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-footer { font-size: 10px; }
}

@media (max-width: 1099px) {
  .dwp-body.with-sidebar { display: block; }
  .dwp-sidebar {
    min-height: 0;
    padding: 20px 14px 16px;
    background-image: url('/images/menu-posters/special-menu-mobile-tablet-background-v1.webp');
    background-position: center top;
    background-size: cover;
  }
  .dwp-special-head { text-align: center; }
  .dwp-special-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
  }
  .dwp-special-items li { min-height: 48px; align-content: center; padding: 8px 9px; }
  .dwp-special-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(110px, .8fr);
    align-items: center;
    gap: 12px;
    margin: 12px 0 0;
    padding: 8px 12px;
  }
  .dwp-special-showcase img { max-height: 104px; object-fit: contain; }
  .dwp-special-showcase figcaption { margin: 0; font-size: 9px; }
}

@media (max-width: 640px) {
  .dynamic-weekly-poster { border-radius: 17px; }
  .dwp-header { min-height: 148px; padding: 20px 36px 14px; }
  .dwp-logo { width: 43px; height: 43px; top: 10px; right: 11px; }
  .dwp-title strong { font-size: clamp(42px, 15vw, 60px); -webkit-text-stroke-width: 4px; }
  .dwp-title span { font-size: 11px; }
  .dwp-header p { margin-top: 9px; font-size: 10px; }
  .dwp-header h2 { font-size: clamp(17px, 5.6vw, 22px); }
  .dwp-header h2 [data-th] { white-space: nowrap; }
  .dwp-body.with-sidebar { display: block; }
  .dwp-menu { padding: 9px 8px 10px; }
  .dwp-day + .dwp-day { margin-top: 9px; }
  .dwp-date { min-width: 42px; font-size: 11px; }
  .dwp-day-name { font-size: 16px; }
  .dwp-price-head { font-size: 9px; }
  .dwp-dish { grid-template-columns: 37px minmax(0,1fr) 34px; column-gap: 6px; font-size: 10.5px; line-height: 1.45; }
  .dwp-safe { margin-left: 3px; }
  .dwp-safe-icon { width: 10px; height: 10px; }
  .dwp-safe-legend { gap: 5px; margin-top: 9px; padding: 5px 6px; font-size: 9.5px; }
  .dwp-safe-legend .dwp-safe-icon { width: 12px; height: 12px; }
  .dwp-sidebar { padding: 14px 8px 12px; }
  .dwp-sidebar h3 { font-size: 10px; }
  .dwp-sidebar p { font-size: 6px; }
  .dwp-special-items li { font-size: 10.5px; }
  .dwp-special-items li > span { font-size: 12.5px; }
  .dwp-special-showcase { grid-template-columns: minmax(0, 1.6fr) minmax(88px, .9fr); gap: 8px; padding: 6px 8px; border-radius: 8px; }
  .dwp-special-showcase img { border-radius: 5px; }
  .dwp-special-showcase figcaption,
  .weekly-poster-host[data-poster-variant="detail"] .dwp-special-showcase figcaption { margin-top: 3px; font-size: 5.5px; }
  .dwp-promo-price { font-size: 8px; }
  .dwp-footer { font-size: 6.5px; }
  .weekly-poster-host[data-poster-variant="compact"] .dwp-dish { font-size: 13px; }
  .weekly-poster-host[data-poster-variant="detail"] .dwp-dish { grid-template-columns: 40px minmax(0,1fr) 36px; column-gap: 7px; font-size: 13px; }
  .weekly-poster-host[data-poster-variant="detail"] .dwp-day-name { font-size: 17px; }
  .weekly-poster-host[data-poster-variant="detail"] .dwp-special-items li { font-size: 10.5px; }
  .weekly-poster-host[data-poster-variant="detail"] .dwp-special-items li > span { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .dynamic-weekly-poster * { scroll-behavior: auto !important; }
}
