:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --text-color-rgb: 0, 0, 0;
}

main {
    display: flex;
    /* max-width: 1200px; */
    flex-direction: column;
    gap: 20px; /* 컨테이너 사이 간격 */
    padding: 0 10px;
    margin: 0 auto;
}

.page-content.hidden {
    display: none;
}

body {
    color: var(--text-color);
    background-color: var(--bg-color);
    padding: 0;
    margin: 0;
}

.gnb {
    position: sticky;
    top: 0;
    z-index: 99;
    background-color: var(--bg-color);
}

.header-container {
    display: flex;
    padding: 10px 0 10px 0 ;
    border-bottom: 1px solid var(--text-color);
    justify-content: space-between;
}
.title {
    font-family: '할배티카';
    font-size: 1.2em;
    padding: 0 10px;
}
.header-controls {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 8px;
}
.theme-toggle {
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    margin: 0 10px 0 0;
}
.theme-icon {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: white;
    border: 1px solid #000;
}
.theme-toggle.light .theme-icon {
    background-color: black;
    border: 1px solid #fff;
}
.color-button {
    width: 24px;
    height: 24px;
    border: 1px solid var(--text-color);
    border-radius: 50%;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    cursor: pointer;
}
.color-button.bg::before {
    content: '';
    width: 10px;
    height: 12px;
    border: 1px solid var(--text-color);
    background-color: transparent;
    display: block;
}
.color-button.fg::before {
    content: '가';
    font-weight: 200;
    color: var(--text-color);
    font-size: 14px;
    display: block;
}
.bgPicker {
    margin-bottom: 20px;
}



.container-row {
    display: flex;
    /* align-items: flex-start; */
    gap: 20px;
    width: 100%;
    flex-wrap: nowrap;
}

.container {
    position: relative;
    flex: 1 1 0%;
    flex-direction: column;
    width: 100%;
    display: flex;
    align-items: flex-start;
    border-top: 0px dotted var(--text-color);
}


/* 태블릿 기준 (예: 너비 1200px 이하) */
@media (max-width: 1200px) {
    .container-row {
    flex-wrap: wrap;
    }

    .container {
    flex: 1 1 48%; /* 2단 배치 시 적절한 비율 */
    margin-bottom: 20px;
    }
}

/* 모바일 기준 (예: 너비 768px 이하) */
@media (max-width: 768px) {
    .title {
        font-family: '할배티카';
        font-size: 1em;
    }

    .container-row {
        flex-direction: column;
        gap: 20px;
    }

    .container {
        flex: 1 1 100%;
    }

    .controls-hidden {
        min-width: 325px;
    }
}

.controller-container {
    display: flex;
    position: relative;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    font-family: '할배티카';
    gap: 6px 16px;
}
.controls-hidden {
    flex: 1;
    display: flex;
    justify-content: end;
    position: absolute;
    top: 0%;
    right: 0;
    z-index: 3;
    /* min-width: 385px; */
    margin-left: auto;
    gap: 6px 16px;
    background-color: var(--bg-color);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.controller-container:hover .controls-hidden,
.controller-container:focus-within .controls-hidden {
    opacity: 1;
    pointer-events: auto;
}

@media (hover: none) {
    .controls-hidden {
        position: relative;
        top: auto !important;
        width: 100%;
        opacity: 1;
        pointer-events: auto;
    }
}

.custom-dropdown {
    position: relative;
    width: 10%;
    min-width: 100px;
    display: inline-block;
    font-size: 16px;
    font-family: '할배티카';
    text-align: left;
}
.dropdown-toggle {
    padding: 8px 6px 8px 6px;
    border: 0;
    background-color: transparent;
    color: inherit;
    font-size: 16px;
    font-family: '할배티카';
    text-decoration: underline;
    text-underline-offset: 6px;
    text-align: left;
    cursor: pointer;
}
.dropdown-menu {
    position: absolute;
    top: 90%;
    left: 0;
    width: 100%;
    background-color: rgba(var(--text-color-rgb), 0.5);
    border-radius: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 1000;
    display: none;
    min-width: 140px;
    color: var(--text-color);
}
.dropdown-menu li {
    padding: 6px 6px;
    cursor: pointer;
    background-color: var(--bg-color);
    color: var(--text-color);
}
.dropdown-menu li:hover {
    text-decoration: underline;
    text-underline-offset: 6px;
}

.slider-group {
    flex-direction: column;
}

.slider-row {
    display: flex;
    flex-wrap: wrap; /* 줄바꿈 허용 */
    gap: 4px 12px;
}

.slider-container {
    width: calc(24.8% - 10px); /* 4개 기준 */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 10px;
}
.slider-tag {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    align-items: flex-end;
    padding-top: 8px;
}
.slider-label, .axis-value {
    font-size: 10px;
    font-family: '할배티카';
    margin: 0;
}
.variableSliders{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap; /* 줄바꿈 허용 */
    width: 100%;
    gap: 10px 12px;
}
.slider-control,.variable-slider {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    height: 1px;
    background: var(--text-color);
    transform: translateY(-3px);
    margin: 8px 0 0 0;
}
.slider-control::-webkit-slider-thumb,.variable-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border: 1px solid var(--text-color);
    border-radius: 10px;
    background: var(--bg-color);
    cursor: pointer;
}

.align-buttons {
    min-width: 80px;
    /* display: flex; */
    justify-content: space-between;
}
.align-button {
    background: none;
    border: none;
    padding: 6px 1px; 
    margin: 0;
    cursor: pointer;
    opacity: 1;
    color: var(--text-color);
}
.align-button svg {
  fill: currentColor;
}
.align-button.active {
  opacity: 1;
}


/* .resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 100%;
  cursor: ew-resize;
  background: transparent;
  z-index: 10;
}
.resize-handle::after {
  content: "";
  position: absolute;
  top: 22px;
  right: 2px;
  width: 0;
  height: 0;
  border-right: 6px solid var(--text-color);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  transform: translateY(-50%);
} */

/* 기존 코드를 아래 코드로 교체하세요. */

/* 폰트 웨이트 버튼 컨테이너 */
.font-weight-buttons {
    display: flex;
    flex-wrap: wrap; /* 버튼이 많아지면 줄바꿈되도록 */
    gap: 8px; /* 버튼 사이의 가로 간격 */
    width: 100%;
    box-sizing: border-box;
    /* 다른 컨트롤러들과의 정렬 및 간격을 맞추기 위한 설정 */
    margin-bottom: 15px;
    padding: 8px 10px 0 10px;
}

/* 개별 웨이트 버튼 */
.weight-button {
    font-size: 10px;
    font-family: '할배티카';
    padding: 4px 10px; /* 버튼 내부 여백 */
    border-radius: 12px; /* 둥근 형태 */
    cursor: pointer;
    background-color: transparent;
    color: var(--text-color);
    /* 슬라이더처럼 연한 테두리 추가 */
    border: 1px solid rgba(var(--text-color-rgb), 0.4);
    opacity: 0.8;
    transition: all 0.2s ease-in-out; /* 부드러운 전환 효과 */
}

/* 버튼에 마우스를 올렸을 때 */
.weight-button:hover {
    opacity: 1;
    border-color: var(--text-color);
    background-color: rgba(var(--text-color-rgb), 0.05);
}

/* 선택된(활성화된) 버튼 */
.weight-button.active {
    opacity: 1;
    background-color: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
}


.textarea {
    width: 100%;
    /* margin-top: 16px; */
    /* field-sizing: content; */
    z-index: 2;
    position: relative;
    overflow: hidden;
    resize: none;
    box-sizing: border-box;
    border: 0;
    padding: 0 0 30px 0;
    outline-style: none;
    word-break: keep-all;
    text-align: left;
    text-rendering: geometricPrecision;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.footer {
    position: fixed;
    bottom: 10px;
    left: 20px;
    font-size: 10px;
    padding: 6px 10px;
    z-index: 999;
    font-family: '할배티카';
    color: #ccc;
    background-color: none;
}
.footer a {
    text-decoration: underline;
    margin: 0 2px;
    color: #ccc;;
}
.sandolllogo {
    display: flex;
    align-items: center;
    padding: 10px 0;
}
.sandolllogo img {
    height: 28px;
    display: block;
}

.tooltip {
    position: fixed; /* 기존 absolute → fixed 로 변경 */
    padding: 4px 10px;
    /* border-radius: 20px; */
    background-color: rgba(var(--text-color-rgb), 1);
    color: var(--bg-color);
    font-size: 18px;
    font-family: '할배티카';
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 9999;
}
.textarea:hover {
  cursor: text; /* 또는 help, pointer 등 원하는 모양 */
}

::-webkit-scrollbar {
    width: 2px;
}
::-webkit-scrollbar-track {
    background-color: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background-color: var(--text-color);
}
