.ad-placement[hidden],
.enchant-ad-body[hidden] { display: none !important; }

.ad-placement { min-width: 0; }

.site-ad-preview {
  display: grid;
  min-height: 160px;
  padding: 20px;
  place-items: center;
  border: 1px dashed #9e7a47;
  border-radius: 4px;
  background: #f4ead9;
  color: #5a4128;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.site-ad-label {
  display: block;
  margin-bottom: 8px;
  color: #5c5348;
  font-size: 14px;
  text-align: center;
}

.ad-placement .adsbygoogle { width: 100%; min-height: 160px; }
.quest-ad-part { display: grid; gap: 16px; min-width: 0; }
#site-log-list:empty, #relic-list:empty, #refine-cost-rest:empty, #quest-ad-after:empty { display: none; }
.ad-refine-layout { display: grid; gap: 14px; }
.ad-side-layout, .ad-crafting-content { min-width: 0; }
.ad-crafting-layout > .ad-placement,
.ad-paper-layout > .ad-placement { margin-top: 20px; }
.enchant-ad-body > tr > td { padding: 18px; }
.enchant-ad-body .site-ad-preview { width: 100%; }

@media (min-width: 1400px) {
  .ad-refine-layout.has-ad,
  .ad-crafting-layout.has-ad,
  .ad-enchant-layout.ad-enchant-desktop,
  .ad-equipment-layout.has-ad {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 20px;
  }

  .ad-refine-layout.has-ad > #refine-cost-first,
  .ad-refine-layout.has-ad > #refine-cost-rest { grid-column: 1; }
  .ad-refine-layout.has-ad > .ad-placement { grid-column: 2; grid-row: 1 / span 2; }
  .ad-enchant-layout.ad-enchant-desktop > .enchant-stone-table-wrap { margin-top: 0; }
  .ad-refine-layout.has-ad > .ad-placement .site-ad-preview,
  .ad-crafting-layout.has-ad > .ad-placement .site-ad-preview,
  .ad-enchant-layout.ad-enchant-desktop > .ad-placement .site-ad-preview,
  .ad-equipment-layout.has-ad > .ad-placement .site-ad-preview { min-height: 250px; }
}

@media (min-width: 1600px) {
  .paper-doll-page.ad-paper-active .paper-doll-shell {
    width: min(1500px, calc(100% - 40px));
  }

  .ad-paper-layout.has-ad {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 24px;
  }

  .ad-paper-layout.has-ad > .ad-placement { margin-top: 0; }
  .ad-paper-layout.has-ad > .ad-placement .site-ad-preview { min-height: 250px; }
}

@media (min-width: 1920px) {
  .dash-main.ad-wide-catalog { width: min(1500px, calc(100% - 40px)); }
  .ad-rune-layout.has-ad {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 20px;
  }
  .ad-rune-layout.has-ad > .rune-mode-panel { grid-column: 1; }
  .ad-rune-layout.has-ad > .ad-placement { grid-column: 2; grid-row: 1 / span 2; }
  .ad-rune-layout.has-ad > .ad-placement .site-ad-preview { min-height: 250px; }
}
