/* Keep the reference layout when the same elements are rendered as WP blocks. */
body {
  font-family: var(--wp--preset--font-family--brand, system-ui, sans-serif);
}

.wp-site-blocks {
  padding: 0;
}

.wp-site-blocks > *,
.wp-block-post-content {
  margin-block: 0;
}

.wp-site-blocks :where(a) {
  text-decoration: none;
}

.wp-site-blocks [hidden] {
  display: none !important;
}

.hero.home .slide h2 {
  font-size: clamp(42px, 4.2vw, 78px);
  font-weight: 850;
}

.hero.home .slide h2 .dot {
  color: #ff3758;
}

@media (max-width: 700px) {
  .hero.home .slide h2 {
    font-size: 40px;
  }
}

.footer .footer-grid > div > h3 {
  margin-block-start: 6px;
}

/* Retain the reference footer spacing with the private gallery omitted. */
.footer .footer-grid > div:last-child {
  padding-block-end: calc(1lh + 6px);
}

.onenone-main .v7-img img,
.onenone-main figure img {
  object-fit: contain;
}

.mega-inner.compact > .mega-intro {
  border: 1px solid transparent;
}

.nav-trigger:focus-visible,
.mobile-toggle:focus-visible,
.slider-controls button:focus-visible,
.filter button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

html:not(.onenone-ui) .nav-item:is(:hover, :focus-within) > .mega {
  display: block;
}

html:not(.onenone-ui) .slider-controls {
  display: none;
}

@media (max-width: 1160px) {
  html:not(.onenone-ui) .site-header {
    position: static;
  }

  html:not(.onenone-ui) .nav-main {
    flex-wrap: wrap;
  }

  html:not(.onenone-ui) .nav-links {
    display: block;
    position: static;
    width: 100%;
    flex-basis: 100%;
    order: 5;
  }

  html:not(.onenone-ui) .nav-item > .mega {
    display: block;
  }

  html:not(.onenone-ui) .mobile-toggle {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  .wp-site-blocks *,
  .wp-site-blocks *::before,
  .wp-site-blocks *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.v7-progress { width: 100%; }

.onenone-main .v7-head h2 {
  margin-block-end: 10px;
}

.search-panel .form-grid > .field:has(input[name="consent"]) {
  font-size: 15px;
  line-height: 1.5;
}

.search-panel .field input[type="checkbox"] {
  width: auto;
  min-height: auto;
  margin: 0 0.35em 0 0;
  vertical-align: -0.08em;
}

.search-panel .field:has(input[name="consent"]) a {
  color: var(--blue);
  text-decoration: underline;
}

@media (min-width: 761px) {
  .search-panel .form-grid:has(input[name="consent"]) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 20px;
    row-gap: 6px;
  }

  .search-panel .form-grid:has(input[name="consent"]) > .field {
    grid-column: span 2;
  }

  .search-panel .form-grid:has(input[name="consent"]) > .field:has(select) {
    grid-column: span 3;
  }

  .search-panel .form-grid:has(input[name="consent"]) > .field.full {
    grid-column: 1 / -1;
  }

  .search-panel .field:has(input[name="consent"]) {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 12px;
  }
}

@media (max-width: 760px) {
  .search-panel .form-grid:has(input[name="consent"]) {
    gap: 8.5px 12px;
  }

  .search-panel .form-grid:has(input[name="consent"]) textarea {
    min-height: 130px;
  }
}

@media (min-width: 370px) and (max-width: 760px) {
  .search-panel .form-grid:has(input[name="consent"]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-panel .form-grid:has(input[name="consent"]) > .field {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .search-panel .form-grid:has(input[name="consent"]) > .field:has(input[type="text"]):not(.full) {
    grid-column: auto;
  }
}

.feature-band .mini > .wp-block-paragraph {
  color: inherit;
  font-size: 27px;
  font-weight: 700;
}

.feature-band .mini > hr {
  margin-block: 0.5em;
}

/* WordPress flow resets the reference margins on the first child. */
.v7-stepbody.is-layout-flow > h3:first-child {
  margin-block-start: 8px;
}

@media (max-width: 720px) {
  .v7-process.is-layout-flow > .v7-step:first-child {
    margin-block-start: 6px;
  }
}

/* Preserve the sidebar spacing for role labels stored as non-link spans. */
.v6-portal .side-panel > span {
  display: block;
  padding: 9px;
  border-radius: 6px;
  color: #c4d6f8;
  font-size: 16px;
}

@media (max-width: 720px) {
  .v6-portal .side-panel > span {
    font-size: 14px;
  }

  .v6-portal .v6-section .wrap > .notice {
    min-block-size: calc(36px + 4lh);
  }
}

.v6-portal [data-oo-portal],
.v6-portal [data-oo-editor] {
  min-width: 0;
  overflow-wrap: anywhere;
}

.v6-portal .oo-portal-data {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  margin: 12px 0 0;
}

.v6-portal .oo-portal-data dt {
  font-weight: 700;
}

.v6-portal .oo-portal-data dd {
  margin: 0;
}

.v6-portal .oo-portal-list,
.v6-portal .oo-editor-list,
.v6-portal .oo-report-channels {
  margin-block-end: 0;
}

.v6-portal .oo-portal-records > .oo-portal-list {
  min-block-size: 10rem;
}

.v6-portal .oo-project-records > .oo-portal-list {
  min-block-size: 0;
}

.v6-portal .oo-portal-records:has(> .oo-portal-list + .oo-portal-list) {
  display: grid;
  gap: 16px;
  padding-block-start: 14px;
}

.v6-portal .oo-portal-records:has(> .oo-portal-list + .oo-portal-list) > .small {
  margin: 0;
  padding: 17px 20px;
  border: 1px solid #dce3ef;
  border-radius: 5px;
  background: #edf2ff;
  color: #23417a;
}

@media (min-width: 1101px) {
  .v6-portal .v6-portbody:has(> .oo-portal-records:not(.oo-project-records) > .v6-port-title + .oo-portal-list) > .v6-grid {
    min-block-size: 12rem;
  }

  .v6-portal .oo-portal-records:not(.oo-project-records) > .v6-port-title + .oo-portal-list {
    min-block-size: 13.5rem;
  }
}

.v6-portal .oo-portal-form .actions {
  margin-block-start: 22px;
}

.v6-portal .oo-project-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 20px;
}

.v6-portal .oo-project-fields select {
  min-inline-size: 0;
}

@media (max-width: 350px) {
  .v6-portal .oo-project-fields {
    grid-template-columns: 1fr;
  }
}

.v6-portal .oo-portal-form [data-result] {
  white-space: pre-line;
}

.v6-portal .oo-portal-form [hidden],
.v6-portal .oo-report-channels [hidden] {
  display: none;
}

.v6-portal .oo-report-channels {
  display: block;
  padding: 24px;
  border: 1px solid #dedee2;
  border-radius: 12px;
}

.v6-portal .oo-report-list {
  margin-block-start: 16px;
}

.v6-portal .oo-report-channels [aria-pressed="true"] {
  background: #b92335;
  border-color: #b92335;
  color: #fff;
}

/* A block image link fills its figure without an inline baseline gap. */
.v6-utility .gallery-image {
  margin: 0;
}

.v6-utility .gallery-image > a {
  display: block;
}

.oo-account-panel {
  max-inline-size: 650px;
}

.oo-account-panel > [data-oo-account] {
  padding: 0;
  border: 0;
  background: transparent;
}

[data-oo-account] .field + .field {
  margin-block-start: 16px;
}

[data-oo-account] .oo-account-remember {
  display: block;
  margin-block-start: 4px;
  font-size: 14px;
  line-height: 21px;
}

[data-oo-account] .oo-account-remember + .actions {
  margin-block-start: 5px;
}

@media (max-width: 720px) {
  [data-oo-account] .actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Public destinations retain the responsive sitemap card layout. */
.oo-sitemap-utilities {
  display: grid;
  gap: 14px;
  margin-block-start: 40px;
}

.oo-sitemap-utilities > ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.oo-sitemap-utilities li > a {
  display: grid;
  align-items: center;
  min-block-size: 106px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: #163cc0;
  font-weight: 750;
}

@media (max-width: 1100px) {
  .oo-sitemap-utilities > ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .oo-sitemap-utilities > ul {
    grid-template-columns: 1fr;
  }

  .oo-sitemap-utilities li > a {
    min-block-size: 117px;
  }
}

/* Gallery cards already provide the surface around their block image. */
.v6-gallery > .card > .gallery-image {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.v6-gallery > .card > h3 {
  margin-block-end: 12px;
}

/*
 * 사진 그림 상자(0.1.3): 사진은 비율을 고정한 상자를 cover로 꽉 채운다(위아래·양옆 띠 없음).
 * 홈 머리 슬라이드 21:10, 카드·다른 쪽 그림 5:3. SVG 도식·로고·아이콘은 위의 contain 규칙을 그대로 쓴다(:not([src$=".svg"])).
 * 새 사진은 1536x1024(3:2)로 그리므로 두 비율 모두 가운데를 기준으로 가장자리만 잘린다.
 */
.onenone-main .hero-art {
  min-height: 0;
}

.onenone-main .hero-art > figure,
.onenone-main .photo > figure {
  width: 100%;
  margin: 0;
}

.onenone-main .hero-art img:not([src$=".svg"]),
.onenone-main .photo img:not([src$=".svg"]) {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  object-position: center;
}

.onenone-main .slide .hero-art img:not([src$=".svg"]) {
  aspect-ratio: 21 / 10;
}

/* 홈 카드·소개 구역의 사진 틀: 안쪽 여백을 없애 그림이 틀을 채운다. */
.onenone-main .photo:not(:has(img[src$=".svg"])) {
  padding: 0;
  min-height: 0;
  aspect-ratio: auto;
  overflow: hidden;
}

/* 서비스 쪽 카드 사진(v7-photo)과 프로젝트 쪽 참고 사진(v5-visual reference). */
.onenone-main .v7-photo:not(:has(img[src$=".svg"])) {
  padding: 0;
  aspect-ratio: auto;
  overflow: hidden;
  display: block;
}

.onenone-main .v7-photo img:not([src$=".svg"]),
.onenone-main .v5-visual.reference img:not([src$=".svg"]) {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  max-height: none;
  aspect-ratio: 5 / 3;
  padding: 0;
  margin: 0;
  object-fit: cover !important;
  object-position: center;
}

.onenone-main .v5-visual.reference:not(:has(img[src$=".svg"])) {
  min-height: 0;
  aspect-ratio: auto;
  display: block;
  padding: 0;
}
