/* H4 브랜드 관리 — 카드 그리드·지표 2개. 대표 행동 `브랜드 추가`는 머리글 라임 필 1곳(셸 버튼 재사용), 다크 카드 없음(룩 보강 명세 §3), 글자 12px 이상, 터치 44px. */
.h4-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin:0 0 20px}
.h4-toolbar p{margin:0;font-size:14px;color:var(--pn-ink-soft,#52525b)}
.h4-toolbar p b{font-weight:700;color:var(--pn-ink,#0c0c0c)}
/* 카드 그리드: ≥1100 3열 / 768–1099 2열 / ≤767 1열 */
.h4-brand-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.h4-brand-grid>li{display:flex;min-width:0}
.h4-brand-card{display:flex;flex-direction:column;gap:14px;width:100%;min-width:0;padding:24px;border:1px solid var(--pn-line,#e4e4e7);border-radius:16px;background:#fff}
.h4-brand-head{display:flex;align-items:center;gap:12px;min-width:0}
.h4-brand-head .avatar{flex:none}
.h4-brand-head h2{margin:0;font-size:18px;font-weight:700;line-height:1.3;color:var(--pn-ink,#0c0c0c);overflow-wrap:anywhere}
.h4-brand-desc{margin:0;font-size:14px;line-height:1.5;color:var(--pn-ink-soft,#52525b);display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
/* 지표 2개: 눈썹 라벨(ink 점 8px) + 큰 숫자(Space Grotesk 700, tabular-nums) */
.h4-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0;padding:14px 0;border-top:1px solid var(--pn-line,#e4e4e7);border-bottom:1px solid var(--pn-line,#e4e4e7)}
.h4-metrics>div{min-width:0}
.h4-metrics dt{display:inline-flex;align-items:center;gap:8px;margin:0;font-size:12px!important;font-weight:700!important;letter-spacing:.06em;color:var(--pn-ink,#0c0c0c)}
.h4-metrics dt::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:var(--pn-ink,#0c0c0c)}
html body.a-product .main-shell .h4-metrics dt{color:var(--pn-ink,#0c0c0c)!important}
html body.a-product .main-shell .h4-brands .h4-metrics dd{margin:6px 0 0;font-family:var(--pn-font-display,"Space Grotesk","Pretendard",sans-serif);font-size:40px!important;font-weight:700!important;line-height:1.08!important;letter-spacing:-.02em;font-variant-numeric:tabular-nums;color:var(--pn-ink,#0c0c0c)!important}
html body.a-product .main-shell .h4-brands .h4-metrics dd small{margin-left:4px;font-family:var(--pn-font-body,"Pretendard",sans-serif);font-size:14px!important;font-weight:600!important;letter-spacing:0;color:var(--pn-ink-soft,#52525b)!important}
/* 이름·소개 길이가 달라도 같은 줄 카드의 지표 행이 같은 높이에 오도록 지표를 아래로 정렬 */
.h4-brand-card .h4-metrics{margin-top:auto}
.h4-brand-actions{display:flex;flex-wrap:wrap;gap:8px}
.h4-brand-actions .secondary{min-height:44px;padding:0 18px;font-weight:700}
@media(max-width:1099px){.h4-brand-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:767px){.h4-brand-grid{grid-template-columns:1fr}.h4-brand-card{padding:20px}}
@media(forced-colors:active){.h4-brand-card{border:1px solid ButtonText}.h4-metrics dt::before{background:ButtonText;forced-color-adjust:none}}
/* ── H4b r3c 브랜드 수정·보관·복원·삭제 (서버 묶음 H4b와 같은 릴리스에서만 켜진다). F문법: 시트 반경 24·h2 22px 800·닫기 외곽선 필·검정 필 주 버튼 48px·위험 #b91c1c 외곽선 필(채운 빨강 없음)·`돌아가기` 1.5px ink 외곽선 필 · 라임 없음 · 12px 이상 · 터치 44px · 전환 ≤.12s ── */
/* 카드: 콘텐츠 관리(왼쪽) · 수정·보관(오른쪽 아래 보조 텍스트 버튼) */
html body .h4-brand-actions{align-items:center}
html body .h4-brand-actions .h4b-manage{display:inline-flex;gap:8px;margin-left:auto}
html body .h4b-pill{min-height:44px;min-width:44px;padding:0 18px;border:1.5px solid transparent;border-radius:999px;font-family:inherit;font-weight:700;font-size:14px;line-height:1.2;cursor:pointer;transition:background .12s,color .12s,border-color .12s}
html body .h4b-line{background:#fff;border-color:#0c0c0c;color:#0c0c0c}
html body .h4b-line:hover{background:#f4f4f5}
html body .h4b-gray{background:#f4f4f5;color:#3f3f46}
html body .h4b-gray:hover{background:#e4e4e7;color:#0c0c0c}
html body .h4b-pill:focus-visible,html body .h4b-back:focus-visible,html body .h4b-outline:focus-visible,html body .h4b-solid:focus-visible,html body .h4b-link:focus-visible,html body .h4b-archive summary:focus-visible{outline:3px solid #0c0c0c;outline-offset:2px}
/* 보관된 브랜드 섹션(details) */
html body .h4b-archive{margin:32px 0 0;border:1px solid #e4e4e7;border-radius:16px;background:#fff}
html body .h4b-archive>summary{display:flex;align-items:center;gap:8px;min-height:56px;padding:0 24px;font-size:15px;font-weight:700;color:#0c0c0c;cursor:pointer;list-style:none}
html body .h4b-archive>summary::-webkit-details-marker{display:none}
html body .h4b-archive>summary::after{content:"";margin-left:auto;width:8px;height:8px;border-right:2px solid #52525b;border-bottom:2px solid #52525b;transform:rotate(45deg);transition:transform .12s}
html body .h4b-archive[open]>summary::after{transform:rotate(-135deg)}
html body .h4b-archive>summary b{font-family:var(--pn-font-display,"Space Grotesk","Pretendard",sans-serif);font-variant-numeric:tabular-nums}
html body .h4b-archive-note{margin:0;padding:0 24px 16px;font-size:14px;line-height:1.5;color:#52525b}
html body .h4b-archive-list{list-style:none;margin:0;padding:0;border-top:1px solid #e4e4e7}
html body .h4b-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:14px 24px;border-bottom:1px solid #e4e4e7}
html body .h4b-row:last-child{border-bottom:0}
html body .h4b-row-main{display:flex;align-items:center;gap:12px;min-width:0}
html body .h4b-row-main .avatar{flex:none;opacity:.85}
html body .h4b-row-text{display:grid;gap:2px;min-width:0}
html body .h4b-row-text strong{font-size:15px;font-weight:700;color:#0c0c0c;overflow-wrap:anywhere}
html body .h4b-row-text span{font-size:13px;color:#52525b}
html body .h4b-row-actions{display:flex;gap:8px;flex-wrap:wrap}
html body .h4b-row-actions .secondary{min-height:44px;padding:0 18px;font-weight:700}
/* 위험 외곽선 버튼(보관·삭제) / 중립 채움 버튼(저장) */
html body .h4b-outline{min-height:44px;padding:0 20px;border:1.5px solid #b91c1c;border-radius:999px;background:#fff;color:#b91c1c;font-family:inherit;font-weight:700;font-size:14px;line-height:1.2;cursor:pointer;transition:background .12s,color .12s}
html body .h4b-outline:hover:not(:disabled){background:#fef2f2}
html body .h4b-outline:disabled{border-color:#d4d4d8;color:#71717a;background:#fafafa;cursor:not-allowed}
html body .h4b-solid{width:100%;min-height:48px;padding:0 24px;border:0;border-radius:999px;background:#0c0c0c;color:#fff;font-family:inherit;font-weight:700;font-size:15px;line-height:1.2;cursor:pointer;transition:background .12s}
html body dialog#composer .h4b-solid{height:48px!important;min-height:48px!important}
html body .h4b-solid:hover:not(:disabled){background:#27272a}
html body .h4b-solid:disabled{opacity:.5;cursor:not-allowed}
html body .h4b-link{min-height:44px;padding:0 4px;border:0;background:transparent;color:#0c0c0c;font-family:inherit;font-weight:700;font-size:14px;line-height:1.2;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
/* 모달 안쪽 */
html body .h4b-form{display:grid;gap:16px}
html body .h4b-lead{margin:0;font-size:16px;line-height:1.5;color:#0c0c0c}
html body .h4b-copy{margin:0;font-size:14px;line-height:1.6;color:#3f3f46}
html body .h4b-impact{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0;padding:16px 0;border-top:1px solid #e4e4e7;border-bottom:1px solid #e4e4e7}
html body .h4b-impact>div{min-width:0}
html body .h4b-impact dt{margin:0;font-size:12px;font-weight:700;letter-spacing:.04em;color:#0c0c0c}
html body .h4b-impact dd{margin:6px 0 0;font-family:var(--pn-font-display,"Space Grotesk","Pretendard",sans-serif);font-size:32px;font-weight:700;line-height:1.1;letter-spacing:-.02em;font-variant-numeric:tabular-nums;color:#0c0c0c}
html body .h4b-impact dd small{margin-left:3px;font-family:var(--pn-font-body,"Pretendard",sans-serif);font-size:13px;font-weight:600;letter-spacing:0;color:#52525b}
html body .h4b-check{display:flex;align-items:flex-start;gap:10px;min-height:44px;padding:10px 0 4px;font-size:14px;line-height:1.5;color:#0c0c0c;cursor:pointer}
html body .h4b-check input{flex:none;width:20px;height:20px;margin:1px 0 0;accent-color:#0c0c0c}
html body .h4b-why{margin:-6px 0 0;font-size:13px;line-height:1.5;color:#52525b}
html body .h4b-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
html body .h4b-back{min-height:48px;padding:0 22px;border:1.5px solid #0c0c0c;border-radius:999px;background:#fff;color:#0c0c0c;font-family:inherit;font-weight:700;font-size:14px;line-height:1.2;cursor:pointer;transition:background .12s}
html body .h4b-back:hover{background:#f4f4f5}
html body .h4b-actions .h4b-outline{min-height:48px}
html body .h4b-form .form-error:not(:empty){display:flex;gap:8px;padding:10px 12px;border:1px solid #b91c1c;border-radius:10px;background:#fef2f2;color:#b91c1c;font-size:14px;line-height:1.5}
html body .h4b-form .form-error:not(:empty)::before{content:"▲"!important;flex:none;font-weight:800}
/* 영구 삭제 인라인 확인 카드(보관 행 안) */
html body .h4b-delete-card{flex:1 1 100%;display:grid;gap:12px;margin:4px 0 0;padding:16px;border:1.5px solid #b91c1c;border-radius:14px;background:#fff}
html body .h4b-delete-card label{display:grid;gap:6px;font-size:13px;font-weight:600;color:#0c0c0c}
html body .h4b-delete-card input{min-height:44px;padding:0 12px;border:1px solid #a1a1aa;border-radius:10px;font-size:14px;background:#fff;color:#0c0c0c}
html body .h4b-delete-card .form-error:not(:empty){display:flex;gap:8px;padding:10px 12px;border:1px solid #b91c1c;border-radius:10px;background:#fef2f2;color:#b91c1c;font-size:14px}
html body .h4b-delete-card .form-error:not(:empty)::before{content:"▲"!important;font-weight:800}
/* 시트(수정·보관 모달): 반경 24 · 헤더 h2 22px 800(영문 눈썹 없음) · 닫기 44px 외곽선 필 · 딤 rgba(12,12,12,.5) */
html body dialog#composer.h4b-sheet .modal-heading .eyebrow{display:none}
html body dialog#composer.h4b-sheet{border-radius:24px}
html body dialog#composer.h4b-sheet::backdrop{background:rgba(12,12,12,.5)}
html body dialog#composer.h4b-sheet .modal-heading h2{font-size:22px;font-weight:800;line-height:1.25;letter-spacing:-.01em}
html body dialog#composer.h4b-sheet .modal-heading .icon-button{width:44px;height:44px;border:1.5px solid #0c0c0c;border-radius:999px;background:#fff;color:#0c0c0c}
html body dialog#composer.h4b-sheet .modal-heading .icon-button:hover{background:#f4f4f5}
html body .h4b-form .form-error:empty,html body .h4b-delete-card .form-error:empty{display:none}
/* 마지막 활성 브랜드 안내(▲ #92400e) · 삭제 불가 회색 문장 · 복원 토스트 링크 · 보관 섹션 둘째 안내 */
html body .h4b-warn{display:flex;gap:8px;margin:0;font-size:14px;line-height:1.6;font-weight:600;color:#92400e}
html body .h4b-warn span{flex:none}
html body .h4b-muted{max-width:260px;font-size:13px;line-height:1.5;color:#52525b}
html body .h4b-archive-note-2{padding-top:0}
html body #toast.h4b-with-action.visible{pointer-events:auto}
html body #toast .h4b-toast-link{min-height:44px;padding:0 6px;border:0;background:transparent;color:#fff;font-family:inherit;font-weight:700;font-size:12px;line-height:1.2;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
html body #toast .h4b-toast-link:focus-visible{outline:3px solid #fff;outline-offset:2px}
html body .h4b-focus:focus{outline:none}
@media(max-width:767px){
  html body .h4b-archive>summary,html body .h4b-row,html body .h4b-archive-note{padding-left:16px;padding-right:16px}
  html body .h4b-row-actions{width:100%}
  html body .h4b-row-actions>button{flex:1 1 0}
  html body .h4b-impact{grid-template-columns:1fr;gap:8px}
  html body .h4b-impact>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
  html body .h4b-impact dd{margin:0;font-size:28px}
  html body .h4b-actions>button{flex:1 1 0}
}
@media(forced-colors:active){html body .h4b-outline,html body .h4b-solid,html body .h4b-back,html body .h4b-pill,html body .h4b-archive,html body .h4b-delete-card{border:1px solid ButtonText}}
@media(prefers-reduced-motion:reduce){html body .h4b-pill,html body .h4b-back,html body .h4b-outline,html body .h4b-solid,html body .h4b-archive>summary::after{transition:none}}
