* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    color: #333;
    margin: 0;
    padding: 40px 16px;
    background: #fff;
}

.container {
    max-width: 720px;
    margin: 0 auto;
}

.title {
    font-size: 24px;
    font-weight: 700;
    border-bottom: 2px solid #333;
    padding-bottom: 12px;
}

.desc {
    font-size: 15px;
    color: #555;
    margin: 24px 0;
}

.row {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
}

.label {
    flex: 0 0 100px;
    font-weight: 600;
}

.fixed-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.fixed-list label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.custom-input {
    display: flex;
    gap: 8px;
    flex: 1;
}

.custom-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.custom-input button {
    padding: 8px 16px;
    border: 1px solid #bbb;
    border-radius: 4px;
    background: #f5f5f5;
    cursor: pointer;
}

.custom-input button:disabled,
.tool-btn:disabled,
.upload-box button:disabled,
.chip button:disabled {
    opacity: 0.5;
    cursor: progress;
}

input:disabled {
    cursor: wait;
}

.custom-box {
    border: 1px solid #ccc;
    border-radius: 4px;
    min-height: 180px;
    padding: 16px;
}

.custom-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.counter {
    font-size: 13px;
    color: #666;
}

.custom-tools {
    display: flex;
    gap: 6px;
}

.tool-btn {
    font-size: 12px;
    color: #555;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.tool-btn:hover {
    background: #f2f2f2;
}

.custom-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 14px;
}

.chip button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #888;
    padding: 0;
}

.message {
    min-height: 20px;
    color: #d33;
    font-size: 14px;
    margin-top: 16px;
}

.upload-box {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px dashed #ccc;
}

.upload-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
}

.upload-desc {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px;
}

.upload-result {
    min-height: 20px;
    font-size: 14px;
    margin-top: 12px;
}

.upload-result.blocked {
    color: #d33;
}

.upload-result.allowed {
    color: #2a8;
}

/* 스크린리더 전용 — 화면에는 보이지 않지만 라벨을 읽어준다. */
.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;
}

/* 좁은 화면에서는 라벨과 입력을 세로로 쌓는다. */
@media (max-width: 520px) {
    body {
        padding: 24px 14px;
    }

    .row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .label {
        flex-basis: auto;
    }
}
