/*
 * Drain24 visual refinement v1
 * 공통 셸·타이포·홈 카드·매거진 상세를 한 마지막 레이어에서 정렬한다.
 */

:root {
  --d24-shell-max: 1280px;
  --d24-copy-max: 820px;
  --d24-page-gutter: 24px;
  --d24-refine-ink: #0d2135;
  --d24-refine-text: #31485e;
  --d24-refine-muted: #5b7084;
  --d24-refine-blue: #0878d1;
  --d24-refine-blue-dark: #07599c;
  --d24-refine-aqua: #43c6d2;
  --d24-refine-line: #d7e5ee;
  --d24-refine-surface: rgba(255, 255, 255, 0.94);
  --d24-refine-shadow: 0 20px 54px rgba(16, 56, 83, 0.1);
}

body.theme-drain {
  color: var(--d24-refine-text);
  font-weight: 500;
}

.theme-drain .site-content {
  background-color: #f6fafc;
  background-image:
    linear-gradient(rgba(246, 250, 252, 0.93), rgba(246, 250, 252, 0.93)),
    url("/wp-content/uploads/2026/09/drain24-visual-refine-v1/water-texture-light-v1.webp");
  background-repeat: repeat;
  background-size: auto, 1024px auto;
}

.drain-topbar .container,
.drain-header .container,
.drain-footer > .container,
.d24-mag-index__container,
.d24-mag-single-shell__container {
  width: calc(100% - 48px) !important;
  max-width: var(--d24-shell-max) !important;
  margin-inline: auto !important;
}

.theme-drain .site-content p,
.theme-drain .site-content li,
.theme-drain .site-content dd,
.theme-drain .site-content td {
  font-weight: 500;
}

.theme-drain .site-content h1,
.theme-drain .site-content h2,
.theme-drain .site-content h3,
.theme-drain .site-content h4 {
  color: var(--d24-refine-ink);
  font-weight: 800;
}

.theme-drain .site-content .d24-hero-full .he-hero__title { color: #fff; }
.theme-drain .site-content .d24-hero-full .he-hero__title-em { color: #9decef; }

/* Header */
.drain-header__main {
  min-height: 82px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 28px rgba(10, 38, 61, 0.05);
}

.drain-header__brand-logo {
  width: clamp(210px, 16vw, 236px);
}

.site-header__drawer-logo {
  width: 210px;
}

.drain-nav__list {
  gap: 18px !important;
}

.drain-nav__list > li > a {
  position: relative;
  color: #20364a !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em;
}

.drain-nav__list > li > a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--d24-refine-blue);
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.drain-nav__list > li > a:hover::after,
.drain-nav__list > li > a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.drain-header__photo-cta {
  min-height: 54px;
  gap: 12px;
  padding: 8px 16px 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: linear-gradient(135deg, #0878d1, #005eae 72%);
  box-shadow: 0 12px 28px rgba(0, 102, 190, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.drain-header__photo-cta-copy {
  display: grid;
  gap: 3px;
  text-align: left;
}

.drain-header__photo-cta-copy small {
  color: #bdeeff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.drain-header__photo-cta-copy strong {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.drain-header__photo-cta:hover,
.drain-header__photo-cta:focus-visible {
  background: linear-gradient(135deg, #0a88e6, #00579e 72%);
  box-shadow: 0 16px 32px rgba(0, 94, 173, 0.3);
  transform: translateY(-2px);
}

/* Home shell and spacing */
.d24-home {
  background: transparent !important;
}

.d24-home.he-main > .he-section,
.d24-hero-full .d24-hero-full__content,
.d24-proof__inner,
.d24-checker__inner {
  width: calc(100% - 48px) !important;
  max-width: var(--d24-shell-max) !important;
}

.d24-home .he-section__title,
.d24-home .d24-equipment h2,
.d24-home .d24-proof h2,
.d24-home .d24-checker h2 {
  font-weight: 800;
}

.d24-home .he-section__desc,
.d24-home .d24-equipment p,
.d24-home .d24-proof p,
.d24-home .d24-checker__intro > p:last-child {
  color: var(--d24-refine-text);
  font-weight: 500;
}

.d24-hero-full .he-hero__cta {
  margin-top: 30px;
}

.d24-hero__chips {
  margin-top: 34px;
}

.d24-related-resource {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 48px;
  margin-bottom: 56px !important;
  padding: 64px 0 72px !important;
}

.d24-related-resource .he-section__head {
  margin-bottom: 0 !important;
  text-align: left;
}

.d24-related-resource .he-linkbtn {
  margin: 0 0 8px;
}

/* 밝고 컴팩트한 30초 체크 */
.d24-home.he-main > .d24-checker {
  width: calc(100% - 48px) !important;
  max-width: var(--d24-shell-max) !important;
  margin: 32px auto 88px !important;
  padding: 0 !important;
  color: var(--d24-refine-text);
  background: transparent !important;
}

.d24-checker__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.74fr) minmax(0, 1.26fr);
  gap: clamp(34px, 5vw, 74px);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 68px);
  border: 1px solid rgba(125, 174, 201, 0.38);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(238, 249, 252, 0.93)),
    url("/wp-content/uploads/2026/09/drain24-visual-refine-v1/water-texture-light-v1.webp") center / 780px auto;
  box-shadow: var(--d24-refine-shadow);
}

.d24-checker .he-eyebrow {
  color: var(--d24-refine-blue-dark);
}

.d24-checker h2 {
  margin: 0 0 20px;
  color: var(--d24-refine-ink);
  font-size: clamp(34px, 4vw, 50px);
}

.d24-checker__form {
  gap: 12px;
}

.d24-checker fieldset {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--d24-refine-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(25, 76, 106, 0.05);
}

.d24-checker legend {
  width: 100%;
  margin-bottom: 13px;
  color: var(--d24-refine-ink);
  font-size: 16px;
  font-weight: 800;
}

.d24-checker label {
  min-height: 44px;
  margin: 0 8px 0 0;
  padding: 0 15px;
  border: 1px solid #c8dbe6;
  color: #2c465b;
  background: #fff;
  font-weight: 600;
}

.d24-checker label:has(input:checked) {
  border-color: var(--d24-refine-blue);
  color: #fff;
  background: var(--d24-refine-blue);
  font-weight: 800;
}

.d24-checker__result {
  min-height: 78px;
  padding: 20px 22px;
  border: 1px solid #cbe8ee;
  border-left: 5px solid var(--d24-refine-aqua);
  color: #17374c;
  background: #eefdff;
  font-weight: 600;
}

.d24-checker__result.is-alert {
  color: #6c2a1f;
  background: #fff1ee;
}

/* 공간·지역 카드는 용도에 맞는 실사 비율을 유지한다. */
.d24-spaces__grid {
  grid-auto-rows: 310px;
  gap: 20px;
}

.d24-space-card {
  border: 1px solid rgba(171, 204, 222, 0.35);
  box-shadow: 0 16px 34px rgba(12, 47, 70, 0.12);
}

.d24-space-card > .d24-lazy-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.d24-space-card::before {
  background: linear-gradient(180deg, rgba(7, 26, 43, 0.02) 26%, rgba(7, 26, 43, 0.91) 100%);
}

.d24-space-card strong {
  font-size: 23px;
  font-weight: 800;
}

.d24-space-card small {
  font-size: 14px;
  font-weight: 600;
}

.d24-areas .he-area__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 20px !important;
}

.d24-areas .he-area-card {
  overflow: hidden;
  border: 1px solid var(--d24-refine-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(24, 72, 99, 0.08);
}

.d24-areas .he-area-card__visual {
  width: 100%;
  height: auto !important;
  aspect-ratio: 16 / 10;
}

.d24-areas .he-area-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.d24-areas .he-area-card__body {
  padding: 18px 20px 20px;
}

.d24-areas .he-area-card__body strong {
  font-size: 18px;
  font-weight: 800;
}

.d24-areas .he-area-card__body span {
  font-size: 13px;
  font-weight: 600;
}

/* 공통 카드 배지는 부모 규칙의 top/bottom 동시 지정에서 격리한다. */
.d24-mag-index .he-mag-card__badge,
.d24-home .he-mag-card__badge,
.d24-home .he-review-card__badge,
.d24-area-post-card__badge {
  top: auto !important;
  right: auto !important;
  bottom: 12px !important;
  left: 12px !important;
  display: inline-flex !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: calc(100% - 24px) !important;
  height: auto !important;
  min-height: 0 !important;
  align-items: center;
  padding: 7px 11px !important;
  border-radius: 999px !important;
  line-height: 1.2 !important;
  writing-mode: horizontal-tb !important;
  transform: none !important;
}

/* Footer */
.drain-footer__name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.drain-footer__about {
  max-width: 390px;
  margin: 12px 0 18px;
  color: #bdd0df;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.75;
}

.drain-footer__related {
  display: grid;
  grid-template-columns: minmax(220px, 0.68fr) minmax(0, 1.32fr);
  gap: 44px;
  align-items: center;
  margin-top: 42px;
  padding: 32px;
  border: 1px solid #2a7087;
  border-radius: 22px;
  background: #073b4c;
}

.drain-footer__related-eyebrow {
  margin: 0 0 8px;
  color: #69ddeb;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.drain-footer__related h4 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.drain-footer__related > div > p:last-child {
  margin: 0;
  color: #aebfcd;
  font-size: 13px;
  line-height: 1.65;
}

.drain-footer__related ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.drain-footer__related a {
  min-height: 94px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  gap: 4px 10px;
  padding: 17px;
  border: 1px solid #3a8094;
  border-radius: 15px;
  color: #fff;
  background: #0e5267;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.drain-footer__related a strong {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.drain-footer__related a span {
  grid-column: 1 / -1;
  color: #b7c9d7;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.drain-footer__related a b {
  color: #69ddeb;
}

.drain-footer__related a:hover,
.drain-footer__related a:focus-visible {
  border-color: #69ddeb;
  background: rgba(73, 192, 218, 0.12);
  transform: translateY(-2px);
}

/* Magazine detail: 넓은 편집형 브리핑 보드 + 읽기용 내부 트랙 */
.d24-mag-single-shell {
  padding: 72px 0 112px;
  background: transparent !important;
}

body.single-magazine .site-content > .d24-mag-single-shell > .d24-mag-single-shell__container { max-width: var(--d24-shell-max) !important; }

.d24-mag-single,
.d24-mag-breadcrumb,
.d24-mag-single__header,
.d24-mag-single__content,
.d24-mag-single__services {
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
}

.d24-mag-breadcrumb {
  margin-bottom: 24px !important;
  font-weight: 600;
}

.d24-mag-poster {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(420px, 1.04fr);
  grid-template-areas:
    "copy visual"
    "checks checks";
  overflow: hidden;
  margin-bottom: 64px;
  border: 1px solid #163b56;
  border-radius: 28px;
  background: #071f32;
  box-shadow: 0 30px 68px rgba(7, 31, 50, 0.2);
}

.d24-mag-poster__copy {
  grid-area: copy;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 520px;
  padding: clamp(38px, 5vw, 72px) !important;
  color: #fff;
  background:
    radial-gradient(circle at 0 0, rgba(64, 201, 215, 0.18), transparent 38%),
    linear-gradient(145deg, #071f32, #0b2b41);
}

.d24-mag-poster .d24-mag-single__eyebrow {
  margin: 0 0 20px;
  color: #72e3ec;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.d24-mag-poster h1 {
  margin: 0;
  color: #fff !important;
  font-size: clamp(38px, 4.1vw, 62px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.d24-mag-poster .d24-mag-single__summary {
  max-width: 680px;
  margin: 24px 0 0;
  color: #d8e7ef;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.72;
}

.d24-mag-poster .d24-mag-single__meta {
  margin-top: 24px;
  color: #a9c2d2;
  font-weight: 600;
}

.d24-mag-poster .d24-mag-single__meta a {
  border-color: rgba(141, 217, 231, 0.3);
  color: #bff6fb;
  background: rgba(63, 187, 207, 0.1);
}

.d24-mag-poster__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.d24-mag-poster__actions a {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.d24-mag-poster__photo {
  color: #062137 !important;
  background: #5adbe4;
}

.d24-mag-poster__phone {
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08);
}

.d24-mag-poster__phone strong {
  color: #fff;
  font-weight: 800;
}

.d24-mag-poster__visual {
  grid-area: visual;
  min-height: 520px;
  background: #0b263a;
}

.d24-mag-poster .d24-mag-single__cover {
  position: relative;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #0b263a;
}

.d24-mag-poster .d24-mag-single__cover img,
.d24-mag-poster .d24-mag-single__cover--fallback img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  border-radius: 0;
}

.d24-mag-poster .d24-mag-single__cover figcaption {
  position: absolute;
  right: 14px;
  bottom: 12px;
  left: 14px;
  padding: 8px 10px;
  border-radius: 9px;
  color: #eaf7fb;
  background: rgba(4, 24, 39, 0.72);
  font-size: 11px;
  backdrop-filter: blur(8px);
}

.d24-mag-poster__checks {
  grid-area: checks;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 26px;
  padding: 24px 30px;
  border-top: 1px solid rgba(120, 199, 218, 0.22);
  background: #eef6fb;
}

.d24-mag-poster__checks > p {
  margin: 0;
  color: var(--d24-refine-ink);
  font-size: 20px;
  font-weight: 800;
}

.d24-mag-poster__checks ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.d24-mag-poster__checks li {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #d5e4ed;
  border-radius: 14px;
  color: #243d52;
  background: #fff;
  font-weight: 700;
}

.d24-mag-poster__checks b {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #fff;
  background: var(--d24-refine-blue);
  font-size: 11px;
  font-weight: 800;
}

.d24-mag-single__content {
  padding: clamp(32px, 5vw, 70px) !important;
  border: 1px solid rgba(151, 190, 211, 0.38);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 48px rgba(20, 61, 86, 0.07);
  font-size: 18px !important;
  line-height: 1.86 !important;
}

.d24-mag-single__content > p,
.d24-mag-single__content > ul,
.d24-mag-single__content > ol,
.d24-mag-single__content > h2,
.d24-mag-single__content > h3,
.d24-mag-single__content > blockquote,
.d24-mag-single__content > .mag-toc,
.d24-mag-single__content > .mag-lead {
  width: 100%;
  max-width: var(--d24-copy-max);
  margin-right: auto;
  margin-left: auto;
}

.d24-mag-single__content h2 {
  position: relative;
  margin-top: 68px;
  padding-top: 22px;
  font-size: clamp(29px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.d24-mag-single__content h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 58px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--d24-refine-blue), var(--d24-refine-aqua));
}

.d24-mag-single__content h3 {
  font-size: 23px;
  font-weight: 800;
}

.d24-mag-single__content .mag-lead {
  border-left: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #eaf6fd, #f5fcfd);
  box-shadow: inset 5px 0 0 var(--d24-refine-blue);
  font-weight: 600;
}

.d24-mag-single__content .mag-toc,
.d24-mag-semantic__panel,
.d24-mag-single__content table {
  border-color: #cfdee8;
  background: #f7fbfd;
}

.d24-mag-single__services {
  margin-top: 48px !important;
  padding-top: 30px !important;
}

@media (max-width: 1220px) {
  .drain-nav__list {
    gap: 13px !important;
  }

  .drain-nav__list > li > a {
    font-size: 14px !important;
  }

  .drain-header__brand-logo {
    width: 196px;
  }

  .drain-header__photo-cta {
    padding-inline: 14px;
  }

  .drain-header__photo-cta-copy strong {
    font-size: 12px;
  }
}

@media (max-width: 1120px) {
  .drain-header__brand-logo {
    width: 220px;
  }

  .d24-related-resource {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .d24-related-resource .he-linkbtn {
    justify-self: start;
  }

  .drain-footer__related {
    grid-template-columns: 1fr;
  }

  .d24-mag-poster {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "visual"
      "checks";
  }

  .d24-mag-poster__copy,
  .d24-mag-poster__visual,
  .d24-mag-poster .d24-mag-single__cover img,
  .d24-mag-poster .d24-mag-single__cover--fallback img {
    min-height: 0;
  }

  .d24-mag-poster__visual {
    aspect-ratio: 16 / 9;
  }

  .d24-mag-poster__copy {
    padding: 48px !important;
  }
}

@media (max-width: 820px) {
  .drain-header__main {
    min-height: 68px;
  }

  .d24-checker__inner {
    grid-template-columns: 1fr;
  }

  .d24-areas .he-area__grid,
  .drain-footer__related ul {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .d24-mag-poster__checks {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  :root {
    --d24-page-gutter: 16px;
  }

  .drain-topbar .container,
  .drain-header .container,
  .drain-footer > .container,
  .d24-mag-index__container,
  .d24-mag-single-shell__container,
  .d24-home.he-main > .he-section,
  .d24-hero-full .d24-hero-full__content,
  .d24-proof__inner,
  .d24-checker__inner,
  .d24-home.he-main > .d24-checker {
    width: calc(100% - 32px) !important;
  }

  .drain-header__brand-logo {
    width: 198px;
  }

  .site-header__drawer-logo {
    width: 194px;
  }

  .d24-hero__chips {
    margin-top: 28px;
  }

  .d24-home.he-main > .d24-checker {
    margin: 24px auto 64px !important;
  }

  .d24-checker__inner {
    padding: 26px 20px;
    border-radius: 22px;
  }

  .d24-checker h2 {
    font-size: 31px;
  }

  .d24-checker label {
    margin-bottom: 8px;
  }

  .d24-spaces__grid {
    grid-auto-rows: 220px;
  }

  .d24-areas .he-area__grid {
    gap: 12px !important;
  }

  .d24-areas .he-area-card__body {
    padding: 14px;
  }

  .d24-related-resource {
    margin-bottom: 38px !important;
    padding: 48px 0 58px !important;
  }

  .drain-footer__related {
    margin-top: 30px;
    padding: 22px;
  }

  .drain-footer__related ul {
    grid-template-columns: 1fr !important;
  }

  .d24-mag-single-shell {
    padding: 42px 0 80px;
  }

  .d24-mag-poster {
    margin-bottom: 36px;
    border-radius: 20px;
  }

  .d24-mag-poster__copy {
    padding: 32px 24px !important;
  }

  .d24-mag-poster h1 {
    font-size: clamp(34px, 10vw, 44px);
    line-height: 1.13;
  }

  .d24-mag-poster .d24-mag-single__summary {
    font-size: 15.5px;
  }

  .d24-mag-poster__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .d24-mag-poster__visual {
    aspect-ratio: 4 / 3;
  }

  .d24-mag-poster__checks {
    gap: 16px;
    padding: 22px 18px;
  }

  .d24-mag-poster__checks ol {
    grid-template-columns: 1fr;
  }

  .d24-mag-single__content {
    padding: 28px 20px !important;
    border-radius: 20px;
    font-size: 16.5px !important;
    line-height: 1.78 !important;
  }

  .d24-mag-single__content h2 {
    margin-top: 48px;
    font-size: 27px;
  }
}

@media (max-width: 420px) {
  .drain-header__brand-logo {
    width: 184px;
  }

  .d24-spaces__grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 245px;
  }

  .d24-areas .he-area__grid {
    grid-template-columns: 1fr !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .drain-nav__list > li > a::after,
  .drain-header__photo-cta,
  .drain-footer__related a {
    transition: none !important;
  }
}
