/* 모든 테마의 입력·접근성 기준. 소재와 색은 각 테마의 --inv-* 토큰을 따른다. */
/* 표지의 원래 구도·사진 비율을 유지하며 화면 높이와 하단 메뉴 안으로 맞춘다. */
html[data-design] .hero-section { width: var(--cover-width, 100%); zoom: var(--cover-scale, 1); margin-inline: auto; z-index: 1; }
html[data-design] .hero-section[data-fill] { justify-content: center; align-content: center; }
/* 화면에 남는 높이를 여백 대신 표지 사진에 준다(invite.js). 1.5배까지는 세로로 길어져도 인물 구도가 버틴다. 달항아리는 더 늘리면 달걀이 된다. */
html:is([data-design="arch"], [data-design="minimal"], [data-design="monoline"], [data-design="fade"], [data-design="editorial"], [data-design="card"], [data-design="hanji"]) #hero-cover-img { --cover-grow: 1.5; }

html[data-design] .invite-container:has(> .hero-section:not(.is-removed):not([hidden]))::after { content: ""; position: absolute; top: var(--cover-top, 0px); left: 0; right: 0; height: var(--cover-rendered-height, 0px); background: var(--cover-surface, transparent); pointer-events: none; }
html[data-design] .hero-korean-names > span,
html[data-design] .hero-names > span { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
html[data-design] :is(.hero-date-box, .hero-venue, .location-venue-name, .location-address, .family-parents, .family-name, .acc-number, .acc-holder) { overflow-wrap: anywhere; }
html[data-design] .hero-names { max-width: 100%; }
html.contain-cover[data-design] #hero-cover-img { object-fit: contain; background: var(--inv-card); }
html.contain-photos:is([data-design="fade"], [data-design="line"]) [data-anchor="greeting"]::after,
html.contain-photos:is([data-design="fade"], [data-design="line"]) .inv-footer::before{ background-size: contain; background-color: var(--inv-card); }
html[data-design] .hero-korean-names { max-width: 100%; }

html[data-design] :is(#n-groom, #n-bride) { min-width: 0; max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
html[data-design] .quick-btn { min-height: 44px; height: auto; padding: 6px 10px; font-size: 12px; }
html[data-design] .floating-quick-bar { background: var(--inv-card); box-shadow: 0 3px 16px #00000014; }
html[data-design] :is(.btn-copy-inline, .map-btn, .contact-row a) { min-height: 44px; }
html[data-design] .btn-copy-inline { display: inline-flex; align-items: center; }

/* 연락·회신·방명록은 표면과 글씨를 함께 바꾼다. 작은 화면과 키보드에서도 창 안을 스크롤한다. */
html[data-design] .modal-backdrop { overflow-y: auto; overscroll-behavior: contain; padding: 16px; }
html[data-design] .modal-box { box-sizing: border-box; flex: 0 0 auto; margin: auto; max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--inv-card); color: var(--inv-primary); }
html[data-design] .modal-box :is(.form-label, .rsvp-privacy) { color: var(--inv-text-sub); }
html[data-design] .modal-box :is(.form-input, .count-btn) { color: var(--inv-primary); background: var(--inv-bg); border-color: var(--inv-gold-border); }
html[data-design] .modal-box .form-input { font-size: 16px; }
html[data-design] .modal-box :is(.count-btn.active, .btn-primary) { background: var(--inv-primary); color: var(--inv-bg); }
html[data-design] .modal-box .btn-primary.rsvp-cancel { /* 윗줄 :is()가 .count-btn.active만큼 세므로 같은 세기로 맞춰 이긴다 */ background: var(--inv-card); color: var(--inv-primary); border: 1px solid var(--inv-gold-border); }
html[data-design] .modal-box :focus-visible { outline: 2px solid var(--inv-primary); outline-offset: 3px; }
html[data-design] .contact-row { flex-wrap: wrap; }
html[data-design] .contact-row > span { min-width: 0; overflow-wrap: anywhere; }
html[data-design] .contact-row > span:last-child { display: inline-flex; align-items: center; gap: 8px; }

/* 긴 이름은 삭제·말줄임 없이 행을 늘린다. */
html.long-names[data-design] .hero-korean-names { line-height: 1.5; letter-spacing: .03em; }
html.long-names[data-design] .hero-korean-names > span:not(.n-and) { white-space: normal; }

html.long-names[data-design="card"] .hero-overlay > div:first-child { position: static; margin-bottom: 16px; }
html.long-names[data-design="card"] .hero-korean-names { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

html.long-names[data-design="threads"] .hero-korean-names { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; font-size: 28px; }
html.long-names[data-design="threads"] .hero-korean-names > span:not(.n-and) { writing-mode: horizontal-tb; margin: 0; }

html[data-design="manuscript"] { --cell: min(42px, calc((100vw - 54px) / 8)); }
html.long-names[data-design="manuscript"] .hero-title-box { height: auto; min-height: calc(var(--cell) * 7); padding: calc(var(--cell) * 3) 16px var(--cell); }
html.long-names[data-design="manuscript"] .hero-korean-names { position: relative; inset: auto; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 20px; font-size: 24px; text-align: center; }
html.long-names[data-design="manuscript"] .hero-korean-names :is(#n-groom, #n-bride) { margin: 0; padding: 0; letter-spacing: 0; white-space: normal; }
html.long-names[data-design="manuscript"] .hero-korean-names .n-and { height: 14px; margin: 0; }
html.long-names[data-design="manuscript"] .hero-korean-names .n-and::after { top: -22px; font-size: 19px; }

/* 영문 등 세로쓰기와 맞지 않는 이름은 사진 위 가로 제목으로 전환한다. */
html.wide-names[data-design="hanji"] .hero-section { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto; padding: 32px 20px 40px; }
html.wide-names[data-design="hanji"] .hero-title-box { grid-row: 1; grid-column: 1; height: auto; }
html.wide-names[data-design="hanji"] .hero-korean-names { height: auto; writing-mode: horizontal-tb; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 24px; }
html.wide-names[data-design="hanji"] .hero-img { grid-row: 2; grid-column: 1; }
html.wide-names[data-design="hanji"] :is(.hero-date-box, .hero-venue) { margin-right: 0; }

/* 그림 속 이름 자리가 좁을 때는 온전한 이름을 그림 아래에서 읽는다. */

html.long-names[data-design="seal"] .hero-korean-names { font-size: 32px; letter-spacing: .04em; }
html[data-design] .mark[data-long] { height: auto; aspect-ratio: auto; grid-template: auto auto / minmax(0, 1fr); direction: ltr; font-size: 12px; line-height: 1.5; }
html[data-design] .mark[data-long] span { display: block; min-width: 0; height: auto; overflow-wrap: anywhere; text-align: center; }
html[data-design="seal"] .mark[data-long] { min-height: 92px; }
html[data-design="manuscript"] .mark[data-long] { width: min(100%, 280px); flex-direction: column; gap: 8px; padding: 12px; }
html[data-design="manuscript"] .mark[data-long] span { width: auto; font-size: 22px; line-height: 1.5; }
html[data-design="manuscript"] .inv-footer .mark { max-width: 100%; flex-wrap: wrap; }
html[data-design="manuscript"] .mark::after { position: static; display: block; margin: 16px 0 0 12px; align-self: center; font-size: 18px; white-space: normal; }

/* 표지 밖으로 밀리던 정보와 작은 보조 문구의 위계를 보강한다. */

html[data-design="minimal"] .hero-korean-names { font-size: 28px; }
html[data-design="midcentury"] .hero-eyebrow { font-size: 40px; }
html[data-design="midcentury"] .hero-korean-names { font-size: 28px; }

html[data-design="arch"] .gallery-item { border-radius: 0; }

@media (max-width: 430px) {
  html[data-design] .loc-info > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  html[data-design="monoline"] .inv-section { display: block; }
  html[data-design="monoline"] .inv-label { white-space: pre-line; margin-bottom: 16px; }
  html[data-design] .location-address-row { flex-wrap: wrap; gap: 4px 12px; }
  html.long-names[data-design] .family-relation-box { display: flex; flex-direction: column; align-items: stretch; }
  html.long-names[data-design] .family-row { display: flex; flex-wrap: wrap; gap: 4px 8px; }
  html.long-names[data-design] .family-parents { max-width: 100%; text-align: left; }
}

/* 사진이 없는 기존 청첩장도 다른 커플을 보여 주지 않고 이름과 일시로 완성한다. */
html.no-cover[data-design] .hero-section { display: flex; flex-direction: column; align-items: center; height: auto !important; min-height: 460px !important; padding: 56px 24px 88px; background: var(--inv-bg); color: var(--inv-primary); text-align: center; }
/* 사진이 없으면 장면 글을 숨기는 스크롤 연출도 끈다. 빈 표지를 여러 화면 넘기지 않는다. */
html.no-cover[data-design] .hero-section *,
html.no-cover[data-design] .hero-section *::before,
html.no-cover[data-design] .hero-section *::after { animation: none !important; }
html.no-cover[data-design] .hero-section *::before,
html.no-cover[data-design] .hero-section *::after { display: none !important; }
html.no-cover[data-design] :is(.hero-section, .hero-overlay, .hero-title-box, .hero-korean-names)::before,
html.no-cover[data-design] :is(.hero-section, .hero-overlay, .hero-title-box, .hero-korean-names)::after,
html.no-cover[data-design] [data-anchor="greeting"]::after,
html.no-cover[data-design] .inv-footer::before,
html.no-cover[data-design] .hero-masthead { display: none; }
html.no-cover[data-design] .hero-overlay,
html.no-cover[data-design] .hero-overlay > div { display: contents; }
html.no-cover[data-design] .hero-overlay > div:first-child { display: none; }
html.no-cover[data-design] .hero-title-box { position: static; order: 1; width: 100%; height: auto; margin: 40px 0 24px; }
html.no-cover[data-design] .hero-korean-names { display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 28px; color: var(--inv-primary); writing-mode: horizontal-tb; text-shadow: none; }
html.no-cover[data-design] .hero-korean-names > span:not(.n-and) { position: static; writing-mode: horizontal-tb; font-size: inherit; color: inherit; }
html.no-cover[data-design] .hero-eyebrow { position: static; order: 0; color: var(--inv-text-sub); text-shadow: none; }
html.no-cover[data-design] :is(.hero-date-box, .hero-venue) { display: block; position: static; width: 100%; margin: 0; padding: 0; writing-mode: horizontal-tb; rotate: none; color: var(--inv-primary); font: 15px/1.8 var(--inv-head); }
html.no-cover[data-design] .hero-date-box { order: 2; }
html.no-cover[data-design] .hero-venue { order: 3; }
/* 라인은 사진이 없어도 하트 선과 'Wedding Day'가 테마다: 흰 선을 먹빛으로 바꿔 종이 위에 남긴다 */
html.no-cover[data-design="line"] .hero-section { justify-content: center; }
html.no-cover[data-design="line"] .hero-section::before { display: block; z-index: -1; background: var(--inv-gold); -webkit-mask: var(--heart) center / 100% 100% no-repeat; mask: var(--heart) center / 100% 100% no-repeat; opacity: .5; }
html.no-cover[data-design="line"] .hero-title-box::before { display: block; color: var(--inv-primary); text-shadow: none; }

/* 인사말 폭: 테마마다 34ch·21em처럼 좁게 잡혀 있던 것을 한 줄 20자 안팎이 들어가게 넓힌다 (가운데 정렬 테마는 margin: auto로 그대로 가운데) */
html[data-design] .greeting-text { max-width: 24em; }

/* 자동으로 반복되는 배경 효과의 재생 버튼. 음악 버튼 아래, 표지 안에서만 보인다. */
.motion-ambient-toggle { position: absolute; top: calc(max(16px, env(safe-area-inset-top, 0px)) + 48px); right: 16px; z-index: 4; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--inv-gold-border); border-radius: 50%; background: var(--inv-card); color: var(--inv-primary); cursor: pointer; }
.motion-ambient-toggle:hover { background: var(--inv-gold-light); }
.motion-ambient-toggle:active { scale: .95; }
.motion-ambient-toggle:focus-visible { outline: 2px solid var(--inv-primary); outline-offset: 3px; }

/* 하객 안내: 장소 → 주소 → 이동 방법, 은행·예금주 → 계좌번호 순으로 읽는다.
   글색은 장식용 금색 대신 각 테마의 본문 토큰을 쓰고, 고객의 인라인 설정은 유지한다. */
html[data-design] :is(.inv-lead, .sec-body, .loc-info, .family-parents, .acc-bank, .gb-msg, .gb-empty) { font-size: 15px; }
html[data-design] :is(.inv-lead, .loc-info) { line-height: 1.8; color: var(--inv-text-sub); }
html[data-design] .location-venue-name { font-size: 22px; font-weight: 600; line-height: 1.5; }
html[data-design] .location-address { font-size: 16px; line-height: 1.75; color: var(--inv-text-sub); }
html[data-design] .loc-info strong { font-size: 13px; font-weight: 600; line-height: 1.7; color: var(--inv-primary); }
html[data-design] .loc-info span { font-size: 15px; line-height: 1.8; }
html[data-design] .date-hero-time { font-size: 16px; line-height: 1.8; }
html[data-design] .family-order { font-size: 13px; }
html[data-design] .family-name { font-size: 18px; }
html[data-design] .acc-number { font-size: 17px; font-weight: 500; line-height: 1.7; font-variant-numeric: tabular-nums; }
html[data-design] .acc-relation { font-size: 12px; }
html[data-design] .acc-row { flex-wrap: wrap; gap: 12px; }
html[data-design] .acc-row > div:first-child { min-width: 0; max-width: 100%; }
html[data-design] :is(.btn-copy, .btn-copy-inline, .map-btn, .contact-cta-btn) { font-size: 14px; min-height: 44px; }
html[data-design] .btn-copy-inline { color: var(--inv-primary); }
html[data-design] :is(#dining-later, #rsvp-done, .rsvp-done-sub) { font-size: 14px; color: var(--inv-text-sub); }
/* 손글씨는 같은 px의 고딕보다 작게 보여 기존의 큰 크기를 살린다. */
html[data-design="diary"] .family-name { font-size: 22px; }
html[data-design="diary"] .family-row-next .family-name { color: color-mix(in srgb, var(--inv-her) 75%, var(--inv-primary)); }
html[data-design="diary"] .date-hero-time { font-size: 20px; }
html[data-design="diary"] .loc-info strong { font-size: 18px; }
html[data-design="diary"] :is(.map-btn, .btn-copy, .btn-copy-inline, .contact-cta-btn) { font-size: 17px; }

/* 표지 위계: 사진 / 이름 / 날짜 중 하나만 크게. 기존 테마의 종이·먹·사진 배색과 서체를 그대로 쓴다.
   주인공 40~88, 이름 보조 22, 일시·장소 14, 메타 12. 본문과 고객의 글자·위치 설정에는 손대지 않는다. */
html[data-cover-focus]:not([data-cover-focus="legacy"]):not(.custom-cover-caption) .hero-eyebrow,
html[data-cover-focus]:not([data-cover-focus="legacy"]) .hero-dday-badge:not(.hero-free-pos) { display: none; }
html.custom-cover-caption[data-cover-focus]:not([data-cover-focus="legacy"]) .hero-eyebrow { font-size: 14px; letter-spacing: .04em; }
html.custom-cover-caption[data-cover-focus]:not([data-cover-focus="legacy"]) .hero-eyebrow::before { content: none; }
html[data-cover-focus="photo"] .hero-names { font-size: 12px; line-height: 1.5; letter-spacing: .04em; margin-bottom: 6px; }
html[data-cover-focus="photo"] .hero-korean-names { font-size: 22px; line-height: 1.5; letter-spacing: .04em; }
html[data-cover-focus="photo"] :is(.hero-date-box, .hero-venue) { font-size: 14px; line-height: 1.7; letter-spacing: .02em; }
html[data-cover-focus="photo"] .hero-venue { opacity: 1; }
/* 가로 사진을 다 보이게 넣으면 남는 위아래를 흰 판 대신 같은 사진의 흐린 빛으로 채운다.
   ponytail: 사진이 표지를 꽉 채우는 테마(classic·line)만. 액자형 테마는 표지 전체가 사진 빛으로 덮여 쓸 수 없다 */
html.contain-cover:is([data-design="classic"], [data-design="line"]) .hero-section { background: var(--cover-src, none) center / cover #1E1B17; }
html.contain-cover:is([data-design="classic"], [data-design="line"]) .hero-section #hero-cover-img { background: transparent; -webkit-backdrop-filter: blur(28px) brightness(.72); backdrop-filter: blur(28px) brightness(.72); }
/* 페이드는 종이 위 사진: 가로 사진은 칸을 사진 비율로 줄여 아래 끝이 그대로 종이에 스민다 (남는 높이는 종이 여백) */
html.contain-cover[data-design="fade"] .hero-section #hero-cover-img { aspect-ratio: auto; object-fit: cover; background: transparent; --cover-grow: 1; }
html[data-design="line"] .hero-section::before { opacity: .42; }
html[data-design="line"] .hero-overlay { justify-content: flex-end; padding-bottom: 96px; background: linear-gradient(transparent 52%, rgba(0, 0, 0, .72)); }
html[data-design="line"] .hero-korean-names { display: flex; justify-content: center; gap: 10px; }
html[data-design="line"] .hero-korean-names .n-and { font-size: 12px; }
html[data-design="line"] .hero-korean-names .n-and::before { content: none; }
html[data-design="line"] .hero-date-box { display: block; margin-top: 16px; border: 0; }
html[data-design="line"] .hero-venue { display: block; margin-top: 4px; }

html[data-design="fade"] .hero-korean-names { font-size: 17px; }
html[data-design="fade"] .hero-korean-names .n-and::before,
html[data-design="fade"] .hero-korean-names .n-and::after { font-size: 22px; }

html[data-design="monoline"] .hero-korean-names > span::before { display: none; }
html[data-design="midcentury"] .hero-section::before { width: 40px; height: 40px; top: 40px; right: 16px; }
html[data-design="midcentury"] .hero-img { margin-top: 0; }

/* 이름 중심: 큰 문구나 상징의 설명보다, 결혼하는 두 사람을 먼저 읽는다. */
html[data-cover-focus="names"] :is(.hero-date-box, .hero-venue) { font-size: 14px; line-height: 1.8; letter-spacing: .02em; }
html:is([data-design="seal"]) .hero-korean-names { font-size: clamp(36px, 10vw, 44px); }

html[data-design="threads"] .hero-korean-names { font-size: 42px; }
html[data-design="lines"] .hero-title-box { display: flex; flex-direction: column; gap: 28px; }
html[data-design="lines"] .hero-korean-names { order: -1; font-size: clamp(34px, 10vw, 44px); gap: 12px; flex-wrap: wrap; }
html[data-design="lines"] .lines-title { font-size: 22px; line-height: 1.5; letter-spacing: 0; }
html[data-design="lines"] .lines-description { font-size: 14px; margin: 16px 0 0; }
html[data-design="lines"] :is(.hero-date-box, .hero-venue) { display: block; border: 0; padding: 0; margin-top: 16px; }
html[data-design="lines"] .hero-venue { margin-top: 4px; }

html[data-design="diary"] .hero-title-box::before { aspect-ratio: 2 / 1; }
html[data-design="diary"] .hero-korean-names { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0 12px; padding: 16px 14px; font-size: clamp(32px, 9vw, 40px); line-height: 1.5; }
html[data-design="diary"] .hero-korean-names::before { content: none; }
html[data-design="diary"] .hero-korean-names::after { content: "두 사람이 결혼하는 날"; flex-basis: 100%; font-size: 18px; text-align: center; }
html[data-design="diary"] .hero-korean-names .n-and::before { content: none; }
html[data-design="diary"] .hero-korean-names .n-and { font-size: 12px; }
html[data-design="diary"] .hero-overlay > div:first-child { font-size: 14px; }
html[data-design="manuscript"] .hero-korean-names { left: var(--cell); right: var(--cell); display: grid; grid-template-columns: minmax(0, 1fr) var(--cell) minmax(0, 1fr); font-size: clamp(22px, 6.5vw, 27px); }
html[data-design="manuscript"] .hero-korean-names :is(#n-groom, #n-bride) { margin: 0; padding: 0; letter-spacing: .02em; white-space: normal; text-align: center; }
html[data-design="manuscript"] .hero-korean-names .n-and { width: auto; margin: 0; }
html[data-design="manuscript"] .hero-korean-names .n-and::after { font-size: 17px; }
html[data-design="manuscript"] .hero-title-box::before { font-size: 18px; color: var(--inv-text-sub); }

/* 날짜 중심: 실제 예식일을 큰 활자로, 이름과 장소는 그 아래 한 묶음으로 둔다. */
html[data-cover-focus="date"] .hero-section { display: flex; flex-direction: column; align-items: stretch; gap: 16px; height: auto; min-height: 0; padding: 40px 24px 32px; text-align: left; }
html[data-cover-focus="date"] .hero-overlay,
html[data-cover-focus="date"] .hero-overlay > div { display: contents; position: static; margin: 0; padding: 0; background: none; }
html[data-cover-focus="date"] .hero-title-box { order: 1; margin: 8px 0 0; }
html[data-cover-focus="date"] :is(.hero-title-box, .hero-korean-names)::before,
html[data-cover-focus="date"] .hero-title-box::after { display: none; }
html[data-cover-focus="date"] .hero-names { font-size: 12px; margin: 0 0 8px; }
html[data-cover-focus="date"] .hero-korean-names { justify-content: flex-start; font-size: 22px; line-height: 1.5; }
html[data-cover-focus="date"] .hero-date-box { order: 0; align-self: stretch; margin: 0; padding: 0; border: 0; font: 14px/1.8 var(--inv-head); letter-spacing: .01em; color: var(--inv-primary); }
html[data-cover-focus="date"] .cover-date-main { display: block; margin-bottom: 16px; font: 400 6em/1 var(--inv-display); letter-spacing: -.06em; white-space: nowrap; }
html[data-design="editorial"] .cover-date-main { font-family: var(--inv-head); font-weight: 900; color: var(--inv-gold); }
html.custom-date-color .cover-date-main { color: var(--text-date-color); }
html[data-design="editorial"] .hero-title-box::before { display: none; }
html[data-cover-focus="names"]:is([data-design="card"], [data-design="editorial"]) .hero-korean-names { font-size: 36px; }
html[data-cover-focus="date"] .hero-venue { order: 2; align-self: start; margin: 0; font-size: 14px; line-height: 1.8; color: var(--inv-text-sub); }
html[data-cover-focus="date"] #hero-cover-img { order: 3; width: 100%; max-width: none; margin: 16px 0 0; aspect-ratio: 4 / 5; --cover-grow: 1.15; }
html:is([data-design="card"], [data-design="editorial"]) .hero-section { padding-top: 28px; }
html[data-design="editorial"][data-cover-focus] .hero-eyebrow:not(:empty) { display: block; order: -1; font: 400 13px/1.7 var(--inv-head); letter-spacing: .02em; padding-bottom: 12px; border-bottom-width: 1px; color: var(--inv-primary); }
html:is([data-design="card"], [data-design="editorial"]):has(#sample-themes:not([hidden])) .invite-container { padding-top: 64px; }

/* 섹션 위계: 신랑·신부 소개·인터뷰·안내 같은 프리셋 글 블록은 큰 장(인사말·오시는 길)보다 제목을 한 단계 낮춘다.
   테마마다 제목 크기가 달라 비율(zoom)로 줄인다. 모노 라인은 제목이 이미 본문과 가까워 그대로 둔다 */
html[data-design]:not([data-design="monoline"]) .custom-sec[data-preset] .inv-section-heading { zoom: .84; }
/* 이어 붙은 신랑·신부 소개는 빌더에서 '나란히'(invitationData.coupleLayout=row → html[data-couple])를 고르면 두 칸으로 놓는다. 기본은 위아래. float라 테마가 섹션 안에 준 display(grid 등)는 그대로.
   사이 구분선(::before·테두리)은 반 폭으로 잘려 보여 빼고, 다음 섹션이 두 칸 아래로 내려오게 clear */
html[data-design][data-couple="row"] .custom-sec:is([data-preset="groom"]:has(+ [data-preset="bride"]), [data-preset="groom"] + [data-preset="bride"]) { float: left; width: 50%; box-sizing: border-box; border-block-width: 0; }
html[data-design][data-couple="row"] .custom-sec:is([data-preset="groom"]:has(+ [data-preset="bride"]), [data-preset="groom"] + [data-preset="bride"])::before { display: none; }
html[data-design][data-couple="row"] .custom-sec[data-preset="groom"]:has(+ [data-preset="bride"]) { padding-right: 8px; }
html[data-design][data-couple="row"] .custom-sec[data-preset="groom"] + [data-preset="bride"] { padding-left: 8px; }
html[data-design][data-couple="row"] .custom-sec[data-preset="groom"] + [data-preset="bride"] + * { clear: both; }
html[data-design][data-couple="row"]:not([data-design="monoline"]) .custom-sec:is([data-preset="groom"]:has(+ [data-preset="bride"]), [data-preset="groom"] + [data-preset="bride"]) .inv-section-heading { zoom: .76; } /* 반 폭 칸: 제목을 한 단계 더 */
html[data-design][data-couple="row"] .custom-sec:is([data-preset="groom"]:has(+ [data-preset="bride"]), [data-preset="groom"] + [data-preset="bride"]) .sec-body { line-height: 1.85; } /* 글자는 15px 기준 그대로, 반 폭이라 줄 간격만 */
html[data-design][data-couple="row"] .custom-sec:is([data-preset="groom"]:has(+ [data-preset="bride"]), [data-preset="groom"] + [data-preset="bride"]) .sec-photo { width: 100%; margin: 0 0 16px; aspect-ratio: 3 / 4; }
/* 섹션에 좌우 바깥 여백을 주는 테마: 두 칸 폭에서 그만큼 뺀다 */
html[data-design="monoline"][data-couple="row"] .custom-sec[data-preset="groom"]:has(+ [data-preset="bride"]) { width: calc(50% - 32px); margin-right: 8px; padding-right: 0; }
html[data-design="monoline"][data-couple="row"] .custom-sec[data-preset="groom"] + [data-preset="bride"] { width: calc(50% - 32px); margin-left: 8px; padding-left: 0; }

/* 참석 여부·방명록 버튼: 테마 색으로 채우고, 모서리와 서체는 그 테마의 연락하기 버튼과 같은 결로 맞춘다.
   (전에는 26개 테마가 사이트 공통 검정 버튼을 그대로 써서 어두운 테마에서는 배경에 묻혔다) */
html[data-design] :is(#btn-rsvp, #btn-gb-write) { background: var(--inv-primary); border-color: var(--inv-primary); color: var(--inv-bg); font-weight: 500; }
html:is([data-design="fade"], [data-design="reel"], [data-design="kinetic"], [data-design="cinema"], [data-design="opening"], [data-design="collage"], [data-design="phone"], [data-design="vhs"], [data-design="bloom"], [data-design="news"], [data-design="projector"], [data-design="seasons"], [data-design="ribbon"], [data-design="envelope"], [data-design="frame"], [data-design="verse"], [data-design="print"]) :is(#btn-rsvp, #btn-gb-write) { border-radius: 999px; }
html:is([data-design="line"], [data-design="lines"], [data-design="threads"], [data-design="manuscript"], [data-design="filmdark"], [data-design="editorial"], [data-design="arch"], [data-design="monoline"], [data-design="hanji"], [data-design="midcentury"]) :is(#btn-rsvp, #btn-gb-write) { border-radius: 0; }
html:is([data-design="minimal"], [data-design="nacre"]) :is(#btn-rsvp, #btn-gb-write) { border-radius: 24px; }
html[data-design="card"] :is(#btn-rsvp, #btn-gb-write) { border-radius: 8px; }
html:is([data-design="fade"], [data-design="threads"], [data-design="manuscript"], [data-design="nacre"]) :is(#btn-rsvp, #btn-gb-write) { font-family: var(--inv-head); }
/* 그림일기는 손으로 그린 테두리가 테마의 성격이라 채우지 않는다 */
html[data-design="diary"] :is(#btn-rsvp, #btn-gb-write) { border: 2.5px solid var(--inv-primary); border-radius: 10px 6px 12px 8px / 8px 12px 6px 10px; background: #FFFFFF; color: var(--inv-primary); font: 700 18px/1 var(--inv-display); }
/* 보조 버튼(캘린더 저장·더 보기·계좌 복사)도 같은 모서리로: 알약 테마에서 2px로 남아 있던 것 */
html:is([data-design="fade"], [data-design="reel"], [data-design="kinetic"], [data-design="cinema"], [data-design="opening"], [data-design="collage"], [data-design="phone"], [data-design="vhs"], [data-design="bloom"], [data-design="news"], [data-design="projector"], [data-design="seasons"], [data-design="ribbon"], [data-design="envelope"], [data-design="frame"], [data-design="verse"], [data-design="print"]) #invite .btn-copy { border-radius: 999px; }
html[data-design="nacre"] #invite .btn-copy { border-radius: 24px; }
html[data-design="line"] #invite .btn-copy { border-radius: 0; }
