/* 전역 기본 요소 */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--new-theme-font-family);
    font-size: var(--new-theme-font-size-body);
    line-height: var(--new-theme-line-height-body);
    background: var(--color-bg-page);
    color: var(--color-text-primary);
}

a {
    color: var(--color-link-text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    color: var(--color-text-primary);
    line-height: 1.3;
}

p {
    margin: 0;
    color: var(--color-text-secondary);
}

small,
.helper-text {
    color: var(--color-text-muted);
}

::selection {
    background: var(--color-selection-bg);
    color: var(--color-selection-text);
}

/* 전역 유틸리티 */
.is-hidden,
.d-none,
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-2 {
    margin-top: var(--new-theme-space-2);
}

/* 화면과 동적 렌더링에서 공통으로 사용하는 최소 배치 유틸리티 */
.d-flex {
    display: flex;
}

.d-grid {
    display: grid;
}

.gap-2 {
    gap: var(--new-theme-space-2);
}

.gap-4 {
    gap: var(--new-theme-space-4);
}

.w-100 {
    width: 100%;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.align-end {
    align-items: flex-end;
}

.flex-1 {
    flex: 1 1 0;
}

.mb-3 {
    margin-bottom: var(--new-theme-space-3);
}

.py-5 {
    padding-top: var(--new-theme-space-5);
    padding-bottom: var(--new-theme-space-5);
}

.p-4 {
    padding: var(--new-theme-space-4);
}

/* 상태 문구에서 사용하는 의미 기반 글자색 */
.text-primary {
    color: var(--color-accent-text);
}

.text-success {
    color: var(--color-status-success-text);
}

.text-warning {
    color: var(--color-status-warning-text);
}

.text-danger {
    color: var(--color-status-danger-text);
}

.text-muted {
    color: var(--color-text-muted);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
