/* 개별 리뷰 상세보기 */
#submission-related-reviews-detail {
    background-color: var(--default-object-bg);
    border-radius: 0.5rem;
    padding: 1rem;
    line-height: 2;
}

#submission-related-reviews-detail span {
    display: inline-block;
    width: 4rem;
}

#submission-related-reviews-detail pre {
    background: #f7f7fa;
    border-radius: 4px;
    padding: 0.7em 1em;
    font-size: 1rem;
    margin-top: 0.3em;
    white-space: pre-wrap;
}

.active-row-detail {
    background-color: var(--default-object-bg);
    color: var(--primary);
}

#aoubt-pages-content h1 {
    font-weight: bold;
    margin: 0;
}

#aoubt-pages-content>hr {
    margin-bottom: 3rem;
}

/* Greeting */
#greeting-container {
    margin-top: 2rem;
    overflow: hidden;
}

#greeting-container>img {
    float: right;
    width: 40vw;
    max-width: 400px;
    height: fit-content;
    margin: 0 0 2rem 2rem;
}

#greeting-container p {
    margin: 0 0 1.5rem 0;
    word-break: keep-all;
    overflow-wrap: break-word;
    text-align: justify;
}

#greeting-container span {
    display: block;
    margin-left: 1rem;
    margin-bottom: 0.5rem;
}

#greeting-container .tail {
    text-align: right;
    font-size: 1.2rem;
    font-weight: bold;
}

@media (max-width: 600px) {
    #greeting-container>img {
        float: none;
        display: block;
        width: 100%;
        margin: 0 auto;
        margin-bottom: 4rem;
        height: auto;
    }
}

/* Purpose */
#purpose-content {
    /* padding: 0 2rem; */
}

#purpose-content h2 {
    margin: 2rem 0 1rem 0;
}

#purpose-content section {
    margin-bottom: 5rem;
}

#purpose-content p {
    margin: 0 0 1rem 0;
    word-break: keep-all;
    overflow-wrap: break-word;
    text-align: justify;
}

#purpose-content ul {
    margin: 0.5rem 0 0 1.5rem;
    line-height: 2;
}

/* Regulation */
#regulation-container {
    padding: 0 0rem;
}

.jang-section {
    margin: 3rem 0 5rem 0;
}

.jang-section:nth-child(1) {
    margin-top: 0rem !important;
}

.jang-section h3 {
    text-align: center;
    margin-bottom: 3rem;
}

.jang-section h3:nth-child(1) {
    margin-top: 0 !important;
}

.jo-section {
    margin: 2rem 0;
}

.jo-section>span {
    font-weight: bold;
    margin-right: 0.5rem;
}

.circle-number-list {
    margin: 1rem 0 0 1.2rem;
}

.circle-number-list>p {
    margin: 0;
}

.number-list {
    margin: 0.5rem 0 0.5rem 1.2rem;
}

.number-list>p {
    margin: 0;
}

/* Organization */
#organization-container {
    width: 90%;
    margin: 2rem auto;
    overflow-x: auto;
}

#organization-container img {
    width: 80%;
    margin-left: 10%;
}

/* Officers */
#officers-container {
    width: 100%;
    margin: 0 auto;
}

#officers-display {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.officers-category-label {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1rem 0 0.6rem 0.2rem;
}

.officers-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.95rem;
    table-layout: fixed;
}

.officers-table thead th {
    padding: 0.45rem 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--string-weak);
    text-align: left;
    border-bottom: 1px solid var(--colorA100);
    background: var(--secondary-light);
    ;
}

.officers-table thead th:nth-child(1) {
    width: 20%;
}

.officers-table thead th:nth-child(2) {
    width: 25%;
}

.officers-table tbody tr {
    border-bottom: 1px solid var(--secondary-light);
}

.officers-table tbody tr:last-child {
    border-bottom: none;
}

.officers-table tbody td {
    padding: 0.55rem 0.75rem;
    color: var(--string-normal);
    vertical-align: middle;
}

.officers-table tbody td:first-child {
    color: var(--string-weak);
    font-size: 0.88rem;
}

.officers-table tbody td:nth-child(2) {
    font-weight: 600;
    color: var(--string-strong);
}

/* Organization upsert (admin inline) */
#admin-organization-upsert {
    margin-top: 1rem;
}

#org-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    color: var(--string-normal);
}

#org-table th {
    padding: 0.5rem 0.75rem;
    background: var(--default-object-bg);
    color: var(--string-strong);
    font-weight: 600;
    font-size: 0.85rem;
    text-align: left;
    border-bottom: 2px solid var(--secondary-light);
}

#org-table td {
    padding: 0.3rem 0.4rem;
    border-bottom: 1px solid var(--secondary-light);
    vertical-align: middle;
}

#org-table tr.section-label td {
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--string-weak);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--colorB5);
    border-bottom: 1px solid var(--colorB20);
}

#org-table select,
#org-table input[type="text"] {
    width: 100%;
    padding: 0.25rem 0.4rem;
    border: 1px solid var(--default-object-bg);
    border-radius: 0;
    font-size: 0.88rem;
    color: var(--string-normal);
    background: transparent;
}

#org-table input[type="text"]:focus,
#org-table select:focus {
    border-color: var(--colorA100);
    outline: none;
}

#org-table tr.new-row td {
    background: var(--colorB5);
}

#org-table td.action-cell {
    width: 60px;
    text-align: center;
}

.delete-organization-btn {
    padding: 0.2rem 0.5rem;
    font-size: 0.78rem;
    font-weight: bold;
    border: 1px solid var(--danger);
    border-radius: 0;
    background: transparent;
    color: var(--danger);
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.delete-organization-btn:hover {
    background: var(--danger);
    color: white;
}

#org-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-top: 1px solid var(--default-object-bg);
    margin-top: 0.5rem;
}

#more-row,
#submit-upsert-organization {
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

#more-row {
    border: 1px solid var(--string-weak);
    color: var(--string-weak);
}

#more-row:hover {
    background: var(--string-weak);
    color: white;
}

#submit-upsert-organization {
    border: 1px solid var(--colorA100);
    color: var(--colorA100);
}

#submit-upsert-organization:hover {
    background: var(--colorA100);
    color: white;
}

/* History */
#history-container {
    width: 90%;
    margin: 0rem auto;
    padding: 1rem 0;
}

.history-timeline-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-timeline-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-year-group {
    display: grid;
    grid-template-columns: 6rem 2px 1fr;
    grid-template-rows: auto 1fr;
    margin-bottom: 2rem;
}

/* 연-월 라벨: 세로선 왼쪽 */
.history-year-label {
    grid-column: 1;
    grid-row: 1;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--colorA100);
    padding-right: 1rem;
    padding-top: 0.05rem;
    text-align: right;
}

.history-month-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--colorA100);
}

/* 세로선 */
.history-year-group::before {
    content: "";
    grid-column: 2;
    grid-row: 1 / 3;
    width: 2px;
    background: var(--secondary-dark);
    justify-self: center;
}

/* 가로선: 세로선 오른쪽으로 뻗음 */
.history-year-group::after {
    content: "";
    grid-column: 3;
    grid-row: 1;
    height: 2px;
    background: var(--secondary-dark);
    align-self: center;
}

/* 내용 목록: 가로선 아래 */
.history-items {
    grid-column: 3;
    grid-row: 2;
    list-style: none;
    padding: 0.5rem 0 0 1rem;
    margin: 0;
}

.history-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.2rem 0;
    line-height: 1.6;
}

.history-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--colorB100);
    flex-shrink: 0;
    margin-top: 0.5rem;
}

.history-content {
    color: var(--string-normal);
    font-size: 0.95rem;
}

.delete-history-btn {
    margin-left: auto;
    padding: 0.1rem 0.45rem;
    font-size: 0.72rem;
    font-weight: bold;
    border: 1px solid var(--danger);
    border-radius: 0;
    background: transparent;
    color: var(--danger);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.delete-history-btn:hover {
    background: var(--danger);
    color: white;
}

/* History admin inline */
#admin-history-upsert {
    margin-top: 0.5rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

#history-add-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#history-date-input,
#history-content-input {
    padding: 0.28rem 0.5rem;
    border: 1px solid var(--default-object-bg);
    font-size: 0.88rem;
    color: var(--string-normal);
    background: transparent;
}

#history-content-input {
    flex: 1;
}

#history-date-input:focus,
#history-content-input:focus {
    border-color: var(--colorA100);
    outline: none;
}

#history-add-btn {
    padding: 0.28rem 0.75rem;
    font-size: 0.85rem;
    font-weight: bold;
    border: 1px solid var(--colorA100);
    border-radius: 0;
    background: transparent;
    color: var(--colorA100);
    cursor: pointer;
    white-space: nowrap;
}

#history-add-btn:hover {
    background: var(--colorA100);
    color: white;
}

/* Responsive Design */
@media (max-width: 700px) {
    #greeting-container {
        margin-top: 0;
        padding: 0 1rem;
    }

    #purpose-content {
        padding: 0 2rem;
    }

    #purpose-content h2 {
        margin: 0rem 0 1rem 0;
    }

    #regulation-container {
        padding: 0 1.5rem;
    }

    #organization-container img {
        width: 100%;
        margin: 0;
    }

    #officers-container {
        width: 90%;
    }

    .history-timeline-list {
        margin-left: -2rem;
    }

    .history-year-label {
        font-size: 1rem;
    }
}
