:root {
    --text: #222;
    --muted: #707070;
    --line: #dedede;
    --soft: #f7f7f7;
    --blue: #4f63e9;
    font-family: "NanumSquareNeo", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Noto Sans KR", sans-serif;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    margin: 0;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

a {
    color: inherit;
}

.site-container {
    width: min(960px, calc(100% - 40px));
    margin: 0 auto;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 20;
    padding: 8px 10px;
    background: #111;
    color: #fff;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.header-inner {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.site-brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    color: var(--text);
    text-decoration: none;
}

.site-brand img {
    width: 148px;
    height: auto;
}

.site-nav {
    display: flex;
    align-self: stretch;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    border-bottom: 2px solid transparent;
    color: #555;
    font-size: 13px;
    text-decoration: none;
}

.site-nav a:hover {
    color: #111;
}

.site-nav a.active {
    border-bottom-color: var(--blue);
    color: #111;
    font-weight: 700;
}

.main-content {
    flex: 1;
    padding-top: 42px;
    padding-bottom: 80px;
}

.home-main {
    padding-top: 0;
}

.page-heading {
    margin-bottom: 30px;
    padding-bottom: 14px;
    border-bottom: 2px solid #333;
}

.page-heading h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.end-notice {
    margin-bottom: 24px;
    padding: 13px 15px;
    border: 1px solid #e6cf8a;
    background: #fffbea;
}

.end-notice strong {
    font-size: 13px;
}

.end-notice p {
    margin: 2px 0 0;
    color: #6f5d25;
    font-size: 12px;
}

.landing-intro {
    padding: 94px 0 102px;
    text-align: center;
}

.landing-intro h1 {
    margin: 0;
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.055em;
}

.landing-intro p {
    margin: 14px 0 28px;
    color: var(--muted);
    font-size: 16px;
}

.landing-actions {
    display: flex;
    justify-content: center;
    gap: 7px;
}

.button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 17px;
    border: 1px solid #bbb;
    border-radius: 3px;
    background: #fff;
    color: #333;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.button:hover,
.button:focus {
    border-color: #777;
    color: #111;
}

.button.primary {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
}

.button.primary:hover,
.button.primary:focus {
    border-color: #3f50c9;
    background: #3f50c9;
    color: #fff;
}

.button:disabled,
.button:disabled:hover,
.button:disabled:focus {
    border-color: #aaa;
    background: #aaa;
    color: #fff;
    cursor: not-allowed;
    opacity: .7;
}

.content-panel,
.board-panel {
    width: 100%;
}

.board-panel {
    margin-top: 4px;
}

.panel-heading {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #555;
}

.panel-heading h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.panel-heading a,
.panel-heading span {
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
}

.panel-heading a:hover {
    color: #111;
    text-decoration: underline;
}

.panel-body {
    padding: 26px 0 0;
}

.table-scroll {
    overflow-x: auto;
}

.legacy-board {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    table-layout: fixed;
}

.legacy-board th,
.legacy-board td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.legacy-board th {
    background: var(--soft);
    color: #555;
    font-size: 12px;
    font-weight: 600;
}

.legacy-board td {
    font-size: 13px;
}

.legacy-board td a {
    display: block;
    overflow: hidden;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.legacy-board td a:hover {
    text-decoration: underline;
}

.legacy-board .board-number {
    width: 80px;
    color: var(--muted);
    text-align: center;
}

.legacy-board .board-date {
    width: 120px;
    color: var(--muted);
    text-align: center;
}

.legacy-board .board-empty {
    height: 110px;
    color: #999;
    text-align: center;
}

.pagination {
    justify-content: center;
    gap: 3px;
    margin: 20px 0 0;
}

.pagination .page-link {
    border-radius: 2px !important;
    color: #555;
    font-size: 12px;
}

.pagination .active .page-link {
    border-color: var(--blue);
    background: var(--blue);
}

.faq-list {
    border-top: 1px solid var(--line);
}

.faq-list details {
    border-bottom: 1px solid var(--line);
}

.faq-list summary {
    padding: 16px 4px;
    cursor: pointer;
    font-weight: 600;
    list-style-position: inside;
}

.faq-list .faq-answer {
    margin: 0;
    padding: 2px 20px 18px;
    color: #555;
}

.faq-contact {
    margin: 24px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.faq-contact a {
    color: var(--text);
    font-weight: 600;
}

.inquiry-form {
    display: grid;
    gap: 21px;
}

.inquiry-email-verification {
    padding: 14px;
    border: 1px solid var(--line);
    background: var(--soft);
}

.inquiry-email-verification > label,
.verification-code-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
}

.inquiry-email-verification .verification-row input[readonly] {
    background: #fff;
    color: var(--text);
}

.verification-status {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.verification-status.verified {
    color: #176b31;
}

.verification-message {
    margin: 10px 0 0;
}

.verification-code-label {
    margin-top: 14px;
}

.verification-code-row {
    align-items: center;
}

.verification-change-button {
    flex: 0 0 auto;
    white-space: nowrap;
}

.verification-box {
    max-width: 560px;
    margin: 0 auto;
}

.verification-box > h2 {
    margin: 0;
    font-size: 18px;
}

.verification-box > p {
    margin: 6px 0 24px;
    color: var(--muted);
}

.verification-form {
    margin-top: 18px;
}

.verification-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
}

.verification-row {
    display: flex;
    gap: 6px;
}

.verification-row input {
    min-width: 0;
    flex: 1;
    padding: 10px 11px;
    border: 1px solid #c8c8c8;
    border-radius: 3px;
    color: var(--text);
    font: inherit;
}

.verification-row input:focus {
    border-color: var(--blue);
    outline: 2px solid rgb(79 99 233 / 10%);
}

.verification-code-form {
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.verified-email-actions {
    margin-top: 18px;
    text-align: right;
}

.text-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

.inquiry-form label:not(.privacy-check) {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
}

.inquiry-form label span,
.field-help {
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
}

.inquiry-form input:not([type="checkbox"]),
.inquiry-form select,
.inquiry-form textarea {
    width: 100%;
    padding: 10px 11px;
    border: 1px solid #c8c8c8;
    border-radius: 3px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.inquiry-form input:focus,
.inquiry-form select:focus,
.inquiry-form textarea:focus {
    border-color: var(--blue);
    outline: 2px solid rgb(79 99 233 / 10%);
}

.inquiry-form textarea {
    min-height: 150px;
    resize: vertical;
}

.privacy-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.privacy-check input {
    margin-top: 4px;
}

.form-actions {
    display: flex;
    gap: 6px;
    padding-top: 4px;
}

.field-help,
.field-error {
    margin: 6px 0 0;
}

.field-error,
.form-message.error {
    color: #b42318;
    font-size: 12px;
}

.inquiry-type-details {
    margin-top: 9px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    background: var(--soft);
    color: #555;
    font-size: 12px;
}

.rich-text > :first-child {
    margin-top: 0;
}

.rich-text > :last-child {
    margin-bottom: 0;
}

.rich-text p,
.rich-text blockquote,
.rich-text ul,
.rich-text ol {
    margin: 0 0 .8em;
}

.rich-text h2,
.rich-text h3,
.rich-text h4 {
    margin: 1.2em 0 .55em;
    font-size: 1.08em;
}

.rich-text blockquote {
    padding-left: 12px;
    border-left: 3px solid var(--line);
    color: var(--muted);
}

.rich-text a {
    color: var(--blue);
    overflow-wrap: anywhere;
}

.form-message {
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    font-size: 12px;
}

.form-message.success {
    border-color: #abd9b8;
    background: #f3fbf5;
    color: #176b31;
}

.form-message.error {
    border-color: #f0b5af;
    background: #fff7f6;
}

.honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.notice-detail > header {
    padding: 0 0 18px;
    border-bottom: 1px solid var(--line);
}

.notice-detail h2 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
}

.notice-detail time {
    color: var(--muted);
    font-size: 12px;
}

.notice-content {
    min-height: 260px;
    padding: 28px 2px;
    overflow-wrap: anywhere;
    line-height: 1.8;
}

.notice-detail > footer {
    padding-top: 16px;
    border-top: 1px solid var(--line);
    text-align: right;
}

.my-inquiry-detail > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.my-inquiry-detail > header span {
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
}

.my-inquiry-detail h2 {
    margin: 4px 0 0;
    font-size: 20px;
}

.my-inquiry-detail time {
    color: var(--muted);
    font-size: 12px;
}

.inquiry-meta {
    display: grid;
    grid-template-columns: 100px 1fr;
    margin: 0;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
    gap: 8px 18px;
    font-size: 13px;
}

.inquiry-meta dt {
    color: var(--muted);
    font-weight: 500;
}

.inquiry-meta dd {
    margin: 0;
}

.inquiry-body,
.inquiry-attachments,
.inquiry-replies {
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

.my-inquiry-detail h3 {
    margin: 0 0 15px;
    font-size: 15px;
}

.inquiry-body > div,
.inquiry-replies article > div {
    overflow-wrap: anywhere;
    line-height: 1.8;
}

.inquiry-attachments ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.inquiry-attachments li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--soft);
}

.inquiry-attachments a {
    min-width: 0;
    overflow-wrap: anywhere;
}

.inquiry-attachments li:last-child {
    border-bottom: 0;
}

.inquiry-attachments span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
}

.inquiry-replies article {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.inquiry-replies article header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.inquiry-replies article:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.empty-reply {
    margin: 0;
    color: var(--muted);
}

.my-inquiry-detail > footer {
    padding-top: 20px;
}

.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
}

.footer-inner {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #888;
    font-size: 11px;
}

.footer-inner p {
    margin: 0;
}

.footer-inner nav {
    display: flex;
    gap: 16px;
}

.footer-inner a {
    color: inherit;
    text-decoration: none;
}

.footer-inner a:hover {
    color: #333;
    text-decoration: underline;
}

@media (max-width: 680px) {
    .site-container {
        width: calc(100% - 28px);
    }

    .header-inner {
        min-height: 0;
        align-items: stretch;
        flex-direction: column;
        gap: 0;
        padding-top: 18px;
    }

    .site-brand {
        min-width: 0;
        padding-bottom: 16px;
    }

    .site-brand img {
        width: 136px;
    }

    .site-nav {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .site-nav a {
        min-width: 0;
        min-height: 44px;
        justify-content: center;
        padding: 0 3px;
        font-size: 12px;
        white-space: nowrap;
    }

    .main-content {
        padding-top: 28px;
        padding-bottom: 52px;
    }

    .page-heading {
        margin-bottom: 24px;
    }

    .page-heading h1 {
        font-size: 21px;
    }

    .home-main {
        padding-top: 0;
    }

    .landing-intro {
        padding: 64px 0 72px;
    }

    .landing-intro h1 {
        font-size: 32px;
    }

    .landing-intro p {
        margin-top: 10px;
        font-size: 14px;
    }

    .landing-actions {
        flex-wrap: wrap;
    }

    .landing-actions .button {
        min-height: 44px;
        flex: 0 1 auto;
    }

    .panel-heading {
        min-height: 42px;
    }

    .panel-heading span {
        display: none;
    }

    .panel-body {
        padding-top: 20px;
    }

    .table-scroll {
        overflow-x: visible;
    }

    .legacy-board {
        min-width: 0;
    }

    .legacy-board th,
    .legacy-board td {
        padding: 11px 7px;
    }

    .legacy-board td {
        font-size: 12px;
    }

    .legacy-board .board-number {
        width: 58px;
    }

    .legacy-board .board-date {
        width: 84px;
        font-size: 11px;
    }

    .inquiry-email-verification {
        padding: 12px;
    }

    .inquiry-form input:not([type="checkbox"]),
    .inquiry-form select,
    .inquiry-form textarea,
    .verification-row input {
        font-size: 16px;
    }

    .inquiry-form input[type="file"] {
        padding: 8px;
    }

    .privacy-check input {
        flex: 0 0 auto;
    }

    .form-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .form-actions .button {
        min-width: 0;
        min-height: 44px;
        padding-right: 12px;
        padding-left: 12px;
    }

    .verification-row {
        align-items: stretch;
        flex-direction: column;
    }

    .verification-row .button {
        min-height: 44px;
    }

    .verification-change-button {
        align-self: flex-start;
    }

    .notice-content {
        min-height: 180px;
        padding: 22px 2px;
    }

    .my-inquiry-detail h2,
    .inquiry-meta dd {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .my-inquiry-detail > header,
    .inquiry-replies article header {
        flex-direction: column;
        gap: 5px;
    }

    .inquiry-meta {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        padding: 15px 0;
    }

    .footer-inner nav {
        flex-wrap: wrap;
        gap: 6px 16px;
    }
}

@media (max-width: 360px) {
    .site-container {
        width: calc(100% - 20px);
    }

    .site-brand img {
        width: 128px;
    }

    .site-nav a {
        font-size: 11px;
    }

    .landing-intro {
        padding: 54px 0 60px;
    }

    .landing-intro h1 {
        font-size: 28px;
    }

    .landing-actions,
    .form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .landing-actions .button,
    .form-actions .button {
        width: 100%;
    }

    .legacy-board .board-number {
        width: 52px;
    }

    .legacy-board .board-date {
        width: 76px;
    }

    .inquiry-meta {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 8px 12px;
    }

    .inquiry-attachments li {
        flex-direction: column;
        gap: 3px;
    }
}
