/* 색상 metadata가 있는 렌더 DOM만 덮는다. 원래 양식의 padding·배치·테두리 두께는 유지한다. */
:is(.guide-rows,.gins-table)[data-guide-rows-style="accent"][data-sj-guide-accent-ready] > :is(.guide-row,.gins-trow) > :is(.gr-k,.gins-name),
.g-content-table[data-guide-rows-style="accent"][data-sj-guide-accent-ready] > .g-table-row > :is(thead,tbody,tfoot) > tr > :is(th.rh,th[scope="row"]),
table[data-guide-rows-style="accent"][data-sj-guide-accent-ready] > :is(thead,tbody,tfoot) > tr > :is(th.rh,th[scope="row"]),
table[data-guide-table-style="accent"][data-sj-guide-accent-ready] > thead > tr > :is(th,td),
table[data-guide-table-style="accent"][data-sj-guide-accent-ready]:not(:has(> thead)) > tbody:first-of-type > tr:first-child > th {
  background-color: var(--sj-guide-accent-bg) !important;
}
:is(.guide-rows,.gins-table)[data-guide-rows-style="accent"][data-sj-guide-accent-ready] > :is(.guide-row,.gins-trow) > :is(.gr-k,.gins-name)[data-sj-guide-accent-text],
.g-content-table[data-guide-rows-style="accent"][data-sj-guide-accent-ready] > .g-table-row > :is(thead,tbody,tfoot) > tr > :is(th.rh,th[scope="row"])[data-sj-guide-accent-text],
table[data-guide-rows-style="accent"][data-sj-guide-accent-ready] > :is(thead,tbody,tfoot) > tr > :is(th.rh,th[scope="row"])[data-sj-guide-accent-text],
table[data-guide-table-style="accent"][data-sj-guide-accent-ready] > thead > tr > :is(th,td)[data-sj-guide-accent-text],
table[data-guide-table-style="accent"][data-sj-guide-accent-ready]:not(:has(> thead)) > tbody:first-of-type > tr:first-child > th[data-sj-guide-accent-text],
[data-sj-guide-accent-ready] .num[data-sj-guide-accent-text] {
  color: var(--sj-guide-accent-fg) !important;
}
:is(.guide-rows,.gins-table,.g-content-table,table)[data-sj-guide-accent-ready]:is([data-guide-rows-style="accent"],[data-guide-table-style="accent"]) :is(.gr-k,.gins-name,th,td)[data-sj-guide-accent-source-color] { color: var(--sj-guide-accent-source-fg) !important; }
:is(.guide-content-notice,.g-callout)[data-sj-guide-notice-bg-ready] { background-color: var(--sj-guide-notice-bg) !important; }
:is(.guide-content-notice,.g-callout)[data-sj-guide-notice-line-ready] { border-left-color: var(--sj-guide-notice-line) !important; }
:is(.guide-content-notice,.g-callout)[data-sj-guide-notice-line-added] { border-left-width: 3px !important; border-left-style: solid !important; }
[data-sj-guide-notice-text] { color: var(--sj-guide-notice-fg) !important; }
/* SJ 기본 목록 점은 본문 색을 따른다. 글자에 명시한 원래 색상은 renderer가 표시를 붙이지 않는다. */
.g-callout[data-sj-guide-notice-bg-ready] .g-list-callout li[data-sj-guide-notice-text]::before { background-color: currentColor; }
/* 버튼 전체 색상을 지정해도 원래 배경·글자 서식의 원문은 그대로 유지한다. */
a[data-sj-guide-button-bg-ready] { background: var(--sj-guide-button-bg) !important; }
a[data-sj-guide-button-fg-ready], a[data-sj-guide-button-fg-ready] * { color: var(--sj-guide-button-fg) !important; }
/* 링크 자체만 정렬·폭을 바꾼다. 항목 내부 배치·상하 간격과 원문 스타일은 그대로 둔다. */
a[data-sj-guide-button-width-ready] { box-sizing: border-box !important; width: var(--sj-guide-button-width) !important; max-width: 100% !important; }
a[data-sj-guide-button-align-ready] { display: flex !important; max-width: 100% !important; }
a[data-sj-guide-button-align-ready]:not([data-sj-guide-button-width-ready]) { width: var(--sj-guide-button-natural-width, fit-content) !important; }
a[data-sj-guide-button-align-ready][data-guide-button-align="left"] { margin-left: 0 !important; margin-right: auto !important; }
a[data-sj-guide-button-align-ready][data-guide-button-align="center"] { margin-left: auto !important; margin-right: auto !important; }
a[data-sj-guide-button-align-ready][data-guide-button-align="right"] { margin-left: auto !important; margin-right: 0 !important; }
/* 강조 안내의 기존 gradient와 내부 버튼 색은 별도로 유지한다. 선택한 색만 덮는다. */
:is(.ac-hero,.guide-content-hero)[data-guide-hero-bg][data-sj-guide-hero-bg-ready] { background: var(--sj-guide-hero-bg) !important; }
:is(.ac-hero-bar,.guide-content-hero-bar)[data-sj-guide-hero-bar-ready] { background: var(--sj-guide-hero-bar) !important; }
