/* RC38 FOOTER SECTION START.
   Keep these rules confined to the approved common footer and daily-result footer.
   Existing body .wrap, forms, reports, sticky bars, and legacy assets stay unchanged. */
body.ssehada-r12 footer.site-footer.rc38-site-footer {
  box-sizing:border-box;
  width:100%;
  max-width:none;
  min-width:0;
  margin:0;
  padding:44px 0 calc(36px + env(safe-area-inset-bottom,0px));
  border-top:1px solid #908a7e;
  background:#f6f2e9;
  color:#242320;
  font-family:var(--font,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR",sans-serif);
  text-align:left;
}
body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-inner {
  box-sizing:border-box;
  width:min(1160px,calc(100% - 64px));
  min-width:0;
  margin:0 auto;
}
body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-main {
  display:grid;
  grid-template-columns:minmax(220px,1fr) auto;
  align-items:start;
  gap:32px 48px;
  min-width:0;
  padding:0 0 24px;
  border-bottom:1px solid #c9c3b7;
}
body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-brand-block {
  min-width:0;
}
body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-brand {
  display:inline-flex;
  align-items:flex-start;
  justify-content:flex-start;
  width:auto;
  min-height:44px;
  max-width:100%;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  font-size:0;
  line-height:1;
  letter-spacing:normal;
  transform:none;
  text-decoration:none;
}
body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-brand .rc38-brand-mark {
  display:block;
  width:144px;
  max-width:100%;
  height:auto;
  margin:0;
}
body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-tagline {
  margin:13px 0 0;
  color:#5a574f;
  font-size:14px;
  font-weight:400;
  line-height:1.75;
  letter-spacing:-.02em;
  word-break:keep-all;
  overflow-wrap:anywhere;
}
body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-links {
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:4px 24px;
  min-width:0;
  margin:0;
  padding:0;
}
body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-links a,
body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-legal a {
  display:inline-flex;
  align-items:center;
  min-height:44px;
  max-width:100%;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  line-height:1.5;
  text-decoration:none;
  text-underline-offset:4px;
  word-break:keep-all;
  overflow-wrap:anywhere;
}
body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-links a {
  font-size:14px;
  font-weight:600;
}
body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-legal {
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  justify-content:flex-start;
  align-items:center;
  gap:0 24px;
  min-width:0;
  margin:15px 0 0;
  padding:0;
  color:#4f4c45;
}
body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-legal a {
  font-size:12px;
  font-weight:500;
}
body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-business {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:6px 32px;
  min-width:0;
  margin:16px 0 0;
  padding:0;
  color:#666158;
  font-size:12px;
  line-height:1.8;
}
body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-business p {
  min-width:0;
  margin:0;
  padding:0;
  color:inherit;
  font-size:inherit;
  font-weight:400;
  line-height:inherit;
  letter-spacing:0;
  word-break:keep-all;
  overflow-wrap:anywhere;
}
body.ssehada-r12 footer.site-footer.rc38-site-footer a:hover {
  text-decoration:underline;
}
body.ssehada-r12 footer.site-footer.rc38-site-footer a:focus-visible {
  outline:2px solid #242320;
  outline-offset:5px;
}
/* Detail already reserves 84px + safe-area on its body for the existing
   fixed purchase bar. Preserve that contract instead of adding a second gap. */
@media(max-width:800px) {
  body.ssehada-r12 footer.site-footer.rc38-site-footer {
    padding-top:30px;
  }
  body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-inner {
    width:calc(100% - 40px);
  }
  body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-main {
    grid-template-columns:minmax(0,1fr);
    gap:20px;
    padding-bottom:18px;
  }
  body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-brand .rc38-brand-mark {
    width:144px;
  }
  body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-tagline {
    margin-top:10px;
    font-size:13px;
  }
  body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-links {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    justify-content:start;
    gap:4px 16px;
  }
  body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-legal {
    gap:0 18px;
    margin-top:12px;
  }
  body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38-footer-business {
    grid-template-columns:minmax(0,1fr);
    gap:6px;
    margin-top:14px;
  }
  body.ssehada-r12.home-r2 footer.site-footer.rc38-site-footer {
    padding-bottom:calc(36px + 84px + env(safe-area-inset-bottom,0px));
  }
}
/* Existing daily-result footer keeps its three legal links, order, and include.
   Only the explicitly marked wrapper and descendants receive the common tone. */
body.daily-result-page .rc38-daily-footer {
  box-sizing:border-box;
  width:100%;
  max-width:none;
  margin:0;
  padding:40px max(32px,calc((100% - 1160px)/2)) calc(36px + env(safe-area-inset-bottom,0px));
  border-top:1px solid #908a7e;
  background:#f6f2e9;
  color:#242320;
  text-align:left;
}
body.daily-result-page .rc38-daily-footer > .result-wordmark {
  display:inline-flex;
  align-items:flex-start;
  width:auto;
  min-height:44px;
  margin:0;
  color:inherit;
  text-decoration:none;
}
body.daily-result-page .rc38-daily-footer > .result-wordmark .rc38-brand-mark {
  display:block;
  width:144px;
  max-width:100%;
  height:auto;
}
body.daily-result-page .rc38-daily-footer > p {
  margin:13px 0 0;
  color:#5a574f;
  font-size:14px;
  line-height:1.75;
}
body.daily-result-page .rc38-daily-footer footer {
  width:100%;
  max-width:none;
  margin:24px 0 0;
  padding:20px 0 0;
  border-top:1px solid #c9c3b7;
  background:transparent!important;
  color:#666158;
}
body.daily-result-page .rc38-daily-footer footer > div {
  width:100%;
  max-width:none;
  margin:0;
  padding:0;
  text-align:left;
}
body.daily-result-page .rc38-daily-footer footer p {
  margin:0;
  color:inherit;
  font-size:12px;
  line-height:1.8;
  word-break:keep-all;
  overflow-wrap:anywhere;
}
body.daily-result-page .rc38-daily-footer footer p + p {
  margin-top:6px;
}
body.daily-result-page .rc38-daily-footer footer > div > div {
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-start;
  align-items:center;
  gap:0 12px;
  margin:14px 0 6px;
  padding:0;
}
body.daily-result-page .rc38-daily-footer footer a {
  display:inline-flex;
  align-items:center;
  min-height:44px;
  max-width:100%;
  margin:0;
  color:#4f4c45;
  font-size:12px;
  font-weight:500;
  line-height:1.5;
  text-decoration:none;
  text-underline-offset:4px;
}
body.daily-result-page .rc38-daily-footer footer a:hover {
  text-decoration:underline;
}
body.daily-result-page .rc38-daily-footer a:focus-visible {
  outline:2px solid #242320;
  outline-offset:5px;
}
body.daily-result-page .rc38-daily-footer footer > div > p:last-child {
  margin-top:14px;
  font-size:11px;
}
@media(max-width:800px) {
  body.daily-result-page .rc38-daily-footer {
    padding:30px 20px calc(36px + env(safe-area-inset-bottom,0px));
  }
  body.daily-result-page .rc38-daily-footer > .result-wordmark .rc38-brand-mark {
    width:144px;
  }
  body.daily-result-page .rc38-daily-footer > p {
    margin-top:10px;
    font-size:13px;
  }
}
/* RC38 FOOTER SECTION END. Header-only brand sizing may be appended separately. */
/* One fixed mark in the existing header links; preserve navigation geometry. */
body.ssehada-r12 header a.wordmark,
body.ssehada-r12.c10 header a.wordmark,
body.ssehada-r12 header a.r5-wordmark,
body.ssehada-r12 header a.result-wordmark {
  display:inline-flex;
  align-items:center;
  flex-shrink:0;
  width:auto;
  min-width:0;
  font-size:0;
  line-height:1;
  letter-spacing:normal;
  transform:none;
}
body.ssehada-r12 header .rc38-brand-mark {
  display:block;
  width:112px;
  max-width:none;
  height:auto;
}
@media(max-width:800px) {
  body.ssehada-r12 header .rc38-brand-mark { width:104px; }
}

/* RC38B adds a reference-style brand inside existing header/footer links.
   Approved RC38 footer markup, CSS and all non-brand layout remain unchanged. */
body.ssehada-r12 .rc38b-brand-slot {
  display:block;
  position:relative;
  flex:0 0 auto;
  width:142px;
  height:calc(112px * 144 / 368);
  margin:0;
  padding:0;
  line-height:1;
}
body.ssehada-r12 .rc38b-brand-mark {
  display:block;
  position:absolute;
  top:50%;
  left:0;
  transform:translateY(-50%);
  flex:0 0 auto;
  width:100%;
  max-width:100%;
  height:auto;
  margin:0;
  padding:0;
}
@media(max-width:800px) {
  body.ssehada-r12 header .rc38b-brand-slot {
    width:132px;
    height:calc(104px * 144 / 368);
  }
}
/* Preserve the exact approved outer slot so tagline/menu/legal coordinates stay fixed. */
body.ssehada-r12 footer.site-footer.rc38-site-footer .rc38b-brand-slot,
body.daily-result-page .rc38-daily-footer > .result-wordmark .rc38b-brand-slot {
  width:144px;
  height:calc(144px * 144 / 368);
}
