.qna-page {
    padding: 72px 20px 96px;
    background: #fff;
    min-height: calc(100vh - 120px);
    color: #102033;
}

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

.qna-hero {
    text-align: center;
    margin-bottom: 62px;
}

.qna-title {
    margin: 0;
    color: #06172f;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.25;
}

.qna-write-card {
    margin-bottom: 28px;
    padding: 28px;
    border: 1px solid #e7ebf2;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.05);
}

.qna-write-head {
    margin-bottom: 18px;
}

.qna-write-head h2 {
    margin: 0 0 8px;
    font-size: 26px;
    color: #111827;
}

.qna-write-head p {
    margin: 0;
    color: #6b7280;
}

.qna-write-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.qna-write-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qna-write-form label {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
}

.qna-write-form input,
.qna-write-form select,
.qna-write-form textarea {
    width: 100%;
    border: 1px solid #d5dbe5;
    border-radius: 12px;
    background: #fff;
    padding: 12px 14px;
    font-size: 14px;
    color: #111827;
    outline: none;
}

.qna-write-form input:focus,
.qna-write-form select:focus,
.qna-write-form textarea:focus,
.qna-answer-form textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.qna-write-form textarea,
.qna-answer-form textarea {
    resize: vertical;
    min-height: 140px;
}

.qna-write-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.qna-admin-guide {
    margin: 0 auto 20px;
    padding: 14px 16px;
    border: 1px solid #d7e1f1;
    border-radius: 14px;
    background: #f8fbff;
    color: #36526f;
    font-weight: 700;
}

.qna-list-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
    padding: 22px 26px;
    border: 1px solid #e7ebf2;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.04);
}

.qna-list-actions h2 {
    margin: 0 0 6px;
    color: #111827;
    font-size: 24px;
    font-weight: 900;
}

.qna-list-actions p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.qna-admin-guide.inline {
    margin: 0 0 22px;
    padding: 12px 16px;
    white-space: nowrap;
}

.qna-write-open-btn,
.qna-cancel-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 104px;
    height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
}

.qna-write-open-btn {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.16);
}

.qna-write-open-btn.qna-write-open-btn-accent {
    min-width: 120px;
    margin-left: 10px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
}

.qna-write-open-btn.muted,
.qna-cancel-link {
    border: 1px solid #d5dbe5;
    background: #ffffff;
    color: #475569;
    box-shadow: none;
}

.qna-topbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 34px;
}

.qna-tabs {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0;
    align-items: stretch;
    padding: 5px;
    border: 1px solid #d7e1f1;
    border-radius: 14px;
    background: #f1f5fb;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 10px 26px rgba(15, 23, 42, 0.06);
}

.qna-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #48617f;
    min-width: 92px;
    height: 38px;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.qna-tab:hover,
.qna-tab.active {
    background: #ffffff;
    color: #0f3f8f;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.qna-tool-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.qna-search {
    position: relative;
    display: block;
    flex: 1 1 auto;
    max-width: 586px;
}

.qna-search input {
    width: 100%;
    height: 40px;
    border: 1px solid #bfc7d2;
    border-radius: 3px;
    background: #fff;
    padding: 0 48px 0 14px;
    font-size: 16px;
    color: #111827;
    outline: none;
}

.qna-search input::placeholder {
    color: #b9c0ca;
}

.qna-search button {
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #566273;
    font-size: 0;
    cursor: pointer;
}

.qna-search button::before {
    content: "⌕";
    font-size: 25px;
    line-height: 1;
}

.qna-search button:hover {
    background: #f3f6fb;
    color: #2563eb;
}

.qna-board {
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}

.qna-board-body {
    display: flex;
    flex-direction: column;
}

.qna-item {
    border-bottom: 1px solid #dfe4ea;
}

.qna-item:last-child {
    border-bottom: none;
}

.qna-item.open .qna-item-link {
    background: #f8fbff;
}

.qna-item.open {
    background: transparent;
}

.qna-item-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 28px;
    align-items: center;
    padding: 18px 16px;
    color: inherit;
    text-decoration: none;
    transition: background 0.2s ease;
}

.qna-item-link:hover {
    background: #f8fbff;
}

.qna-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.qna-line-category {
    min-height: 28px;
    margin-bottom: 4px;
}

.qna-line-title {
    min-height: 26px;
    margin-bottom: 4px;
}

.qna-line-title h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.45;
    color: #06172f;
    font-weight: 900;
}

.qna-badge,
.qna-private-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    flex-shrink: 0;
}

.qna-badge {
    gap: 7px;
}

.qna-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.qna-badge-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.qna-badge.lecture {
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    color: #4338ca;
}

.qna-badge.study {
    border: 1px solid #99f6e4;
    background: #ecfeff;
    color: #0f766e;
}

.qna-private-badge {
    border: 1px solid #fecaca;
    background: #fee2e2;
    color: #b91c1c;
}

.qna-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #344054;
    font-size: 13px;
    font-weight: 400;
    line-height: normal;
}

.qna-list-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 9px;
    color: #36526f;
    font-size: 14px;
    font-weight: 400;
}

.qna-date-text {
    white-space: nowrap;
    color: #36526f;
    font-size: 14px;
    font-weight: 400;
}

.qna-author-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.qna-author-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid #d7dee9;
    background: #f8fafc;
    flex-shrink: 0;
}

.qna-author-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 14px;
    font-weight: 900;
    background: #e5e7eb;
}

.qna-author-name {
    min-width: 0;
    color: #36526f;
    font-size: 14px;
    font-weight: 400;
    word-break: break-all;
}

.qna-detail {
    padding: 0 18px 22px;
    border: 1px solid #b9d8ff;
    border-top: 0;
    border-radius: 0 0 16px 16px;
    background: #f4f9ff;
}

.qna-detail-page {
    padding-top: 42px;
}

.qna-detail-container {
    max-width: 980px;
    margin: 0 auto;
}

.qna-detail-head {
    position: relative;
    padding: 24px 96px 22px 28px;
    border: 1px solid #d7e5f6;
    border-radius: 20px;
    background: linear-gradient(180deg, #fbfdff 0%, #f6faff 100%);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.06);
}

.qna-detail-topline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.qna-detail-close {
    position: absolute;
    top: 24px;
    right: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #dbe7f7;
    border-radius: 999px;
    background: #eef5ff;
    color: #2563eb;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.qna-detail-head h1 {
    margin: 0 0 14px;
    color: #071527;
    font-size: 32px;
    font-weight: 900;
    line-height: 1.24;
    letter-spacing: 0;
}

.qna-detail-meta {
    display: grid;
    gap: 6px;
    color: #47617e;
    font-size: 14px;
    font-weight: 400;
}

.qna-detail-author-row,
.qna-detail-stats-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qna-detail-stats-row {
    color: #667b95;
    font-weight: 400;
}

.qna-detail-meta .qna-author-avatar {
    width: 22px;
    height: 22px;
    font-size: 11px;
}

.qna-detail-meta .qna-author-name {
    color: #47617e;
    font-size: 14px;
    font-weight: 400;
}

.qna-detail-content-card {
    min-height: 120px;
    margin-top: 18px;
    padding: 26px 28px 30px;
    border: 1px solid #dfeaf8;
    border-radius: 18px;
    background: #fff;
    color: #102033;
    font-size: 17px;
    line-height: 1.85;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.qna-question-delete-form {
    position: absolute;
    right: 28px;
    bottom: 22px;
    margin: 0;
}

.qna-detail-section {
    padding-top: 12px;
}

.qna-detail-label {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 800;
    color: #475569;
}

.qna-detail-content {
    padding: 18px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #cfe0ff;
    color: #1f2937;
    line-height: 1.8;
}

.qna-detail-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.qna-delete-btn,
.qna-answer-edit-btn,
.qna-answer-delete-btn {
    border: none;
    border-radius: 12px;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.qna-delete-btn {
    background: #fee2e2;
    color: #b91c1c;
}

.qna-answer-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.qna-answer-actions form {
    margin: 0;
}

.qna-answer-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 58px;
    height: 30px;
    padding: 0 9px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.qna-answer-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 58px;
    height: 30px;
    padding: 0 9px;
    border: 1px solid #ef4444;
    border-radius: 8px;
    background: #ef4444;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.qna-answer-edit-btn::before,
.qna-answer-delete-btn::before {
    content: "";
    width: 14px;
    height: 14px;
    background: currentColor;
}

.qna-answer-edit-btn::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5Z' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5Z' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.qna-answer-delete-btn::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6M10 11v5M14 11v5' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6M10 11v5M14 11v5' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.qna-answer-edit-btn:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    color: #334155;
}

.qna-answer-delete-btn:hover {
    border-color: #dc2626;
    background: #dc2626;
}

.qna-answer-box {
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #eff6ff;
    border: 1px solid #cfe0ff;
}

.qna-answer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.qna-answer-head strong {
    display: block;
    color: #1d4ed8;
    margin-bottom: 4px;
}

.qna-answer-head span {
    color: #64748b;
    font-size: 13px;
}

.qna-answer-content {
    color: #1e3a8a;
    line-height: 1.8;
}

.qna-answer-form-wrap {
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #dbe4ef;
}

.qna-answer-form-wrap h4 {
    margin: 0 0 12px;
    font-size: 18px;
    color: #111827;
}

.qna-answer-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.qna-answer-form textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #d5dbe5;
    border-radius: 12px;
    outline: none;
}

.qna-secret-notice,
.qna-empty {
    padding: 22px 20px;
    text-align: center;
    font-size: 16px;
    color: #6b7280;
}

.qna-secret-notice {
    margin-top: 18px;
    border-radius: 16px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #c2410c;
    font-weight: 700;
}

@media (max-width: 900px) {
    .qna-page {
        padding: 50px 16px 80px;
    }

    .qna-title {
        font-size: 34px;
    }

    .qna-write-grid {
        grid-template-columns: 1fr;
    }

    .qna-topbar {
        align-items: stretch;
    }

    .qna-list-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .qna-admin-guide.inline,
    .qna-write-open-btn {
        width: 100%;
    }

    .qna-search {
        width: 100%;
    }

    .qna-search input {
        width: 100%;
    }

    .qna-item-link {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 16px 18px;
    }

    .qna-detail {
        padding: 0 18px 20px;
    }

    .qna-answer-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .qna-list-side {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        font-size: 14px;
        color: #64748b;
    }

    .qna-author-card {
        justify-content: flex-start;
    }

    .qna-line-title h3 {
        font-size: 15px;
    }

    .qna-meta {
        font-size: 13px;
        gap: 12px;
    }
}

@media (max-width: 560px) {
    .qna-title {
        font-size: 28px;
    }

    .qna-desc {
        font-size: 14px;
    }

    .qna-tab {
        min-width: auto;
        padding: 0 14px;
        font-size: 14px;
    }

    .qna-search {
        flex-direction: column;
    }

    .qna-search button,
    .qna-write-btn {
        width: 100%;
    }
}
