* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arimo', 'Noto Sans KR', sans-serif;
    background-color: #f9fafb;
    color: #101828;
}

.main-content {
    max-width: 1700px;
    margin: 0 auto;
    padding: 0px 90px;
    display: flex;
    flex-direction: column;
    gap: 31.989px;
}

/* ===== Onboarding Banner ===== */
.onboarding-banner {
    background: linear-gradient(172deg, #ffe9d6 0%, #fff4e6 50%, #ffefd5 100%);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.1);
    border-radius: 14px;
}

.onboarding-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.onboarding-title-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.onboarding-title {
    font-size: 16px;
    font-weight: 500;
    color: #1e2939;
}

.onboarding-subtitle {
    font-size: 14px;
    color: #4a5565;
}

.onboarding-progress-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.onboarding-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #ffe9d6;
    border-radius: 9999px;
    overflow: hidden;
}

.onboarding-progress-fill {
    height: 100%;
    width: 40%;
    background-color: #ff7a00;
    border-radius: 9999px;
}

.onboarding-progress-label {
    font-size: 12px;
    color: #4a5565;
}

.onboarding-steps {
    display: flex;
    gap: 16px;
    align-items: center;
}

.onboarding-step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.onboarding-step .step-check {
    width: 16px;
    height: 16px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    flex-shrink: 0;
}

.onboarding-step.done .step-check {
    background-color: #22c55e;
    color: white;
}

.onboarding-step.pending .step-check {
    border: 1.5px solid #d1d5db;
    color: transparent;
}

.onboarding-step.done .step-label {
    color: #364153;
}

.onboarding-step.pending .step-label {
    color: #99a1af;
}

.onboarding-btn {
    background-color: #ff7a00;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0 24px;
    height: 52px;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    transition: background-color 0.2s;
}

.onboarding-btn:hover {
    background-color: #e86e00;
}

/* ===== Main Layout ===== */
.main-layout {
    display: flex;
    min-height: calc(100vh - 120px - 96px);
}

/* ===== QnA Sidebar ===== */
.qna-sidebar {
    width: 240px;
    flex-shrink: 0;
    background-color: #1a2b4a;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.08);
}

/* Profile section */
.qna-profile-section {
    padding: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qna-profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qna-profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background-color: #7c3aed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.qna-profile-text {
    display: flex;
    flex-direction: column;
}

.qna-profile-title {
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.qna-profile-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

/* Score card */
.qna-score-card {
    background-color: rgba(124,58,237,0.15);
    border: 1px solid rgba(124,58,237,0.3);
    border-radius: 10px;
    padding: 13px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qna-score-grade-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qna-score-grade-label {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
}

.qna-grade-badge {
    background-color: #7c3aed;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 4px;
}

.qna-score-value {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.qna-score-number {
    font-size: 20px;
    font-weight: 800;
    color: #7c3aed;
}

.qna-score-unit {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.qna-score-progress-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.qna-score-progress-bar {
    width: 100%;
    height: 6px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 9999px;
    overflow: hidden;
}

.qna-score-progress-fill {
    height: 100%;
    width: 0%;
    background-color: #7c3aed;
    border-radius: 9999px;
}

.qna-score-remaining {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
}

/* Sidebar navigation */
.qna-sidebar-nav {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.qna-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    border: none;
    background-color: transparent;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    text-decoration: none;
    transition: all 0.2s;
}

.qna-nav-btn:hover {
    background-color: rgba(255,255,255,0.08);
    color: white;
}

.qna-nav-btn.active {
    background-color: rgba(255,107,53,0.15);
    color: #ff6b35;
    font-weight: 600;
}

.qna-nav-btn .nav-icon {
    font-size: 18px;
}

/* Monthly stats */
.qna-monthly-stats {
    padding: 0 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: auto;
}

.qna-monthly-label {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    padding: 24px 0 8px 0;
}

.qna-monthly-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 0 0 0;
}

.qna-monthly-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qna-monthly-key {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

.qna-monthly-val {
    font-size: 14px;
    font-weight: 700;
}

.qna-monthly-val.green { color: #22c55e; }
.qna-monthly-val.white { color: white; }
.qna-monthly-val.purple { color: #7c3aed; }

/* ===== Content Area ===== */
.qna-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Content header */
.qna-content-header {
    background-color: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 28px 32px 24px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.qna-content-title {
    font-size: 26px;
    font-weight: 800;
    color: #1a2b4a;
}

.qna-content-subtitle {
    font-size: 13px;
    color: #8b95a1;
    margin-top: 2px;
}

/* Content body */
.qna-content-body {
    padding: 32px 36px 48px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ===== Question Section ===== */
.question-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.question-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.question-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a2b4a;
}

.question-filter-tabs {
    display: flex;
    gap: 8px;
}

.q-filter-btn {
    height: 36px;
    padding: 0 16px;
    border-radius: 10px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.q-filter-btn.active {
    background-color: #ff6b35;
    color: white;
}

.q-filter-btn.inactive {
    background-color: white;
    color: #8b95a1;
}

.q-filter-btn.inactive:hover {
    background-color: #f4f5f7;
}

/* ===== Question Cards ===== */
.question-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.question-card {
    background-color: white;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    padding: 24px;
}

.question-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}

.question-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.q-tag {
    height: 24px;
    padding: 0 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.q-tag.quick {
    background-color: #fff4ef;
    color: #ff6b35;
}

.q-tag.pro {
    background-color: #f0f4ff;
    color: #1a2b4a;
}

.q-tag.lang {
    background-color: #f4f5f7;
    color: #8b95a1;
    font-weight: 500;
}

.q-tag.nominated {
    background-color: #f5f3ff;
    color: #7c3aed;
}

.question-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.question-time-label {
    font-size: 11px;
    color: #8b95a1;
}

.question-time-value {
    font-size: 16px;
    font-weight: 700;
    color: #ef4444;
}

.question-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a2b4a;
    margin-bottom: 8px;
}

.question-body {
    font-size: 14px;
    color: #8b95a1;
    line-height: 1.6;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.question-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.question-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.question-slots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.slot-dots {
    display: flex;
    gap: 4px;
}

.slot-dot {
    width: 24px;
    height: 24px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: white;
}

.slot-dot.filled { background-color: #ff6b35; }
.slot-dot.empty  { background-color: #f4f5f7; }

.slot-count {
    font-size: 12px;
    color: #8b95a1;
}

.question-reward {
    display: flex;
    align-items: center;
    gap: 8px;
}

.question-reward-label {
    font-size: 12px;
    color: #8b95a1;
}

.question-reward-value {
    font-size: 16px;
    font-weight: 700;
    color: #ff6b35;
}

.answer-btn {
    background-color: #ff6b35;
    color: white;
    border: none;
    border-radius: 10px;
    height: 37px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.answer-btn:hover {
    background-color: #e85c27;
}

/* ── Answer Modal ── */
.qna-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.qna-modal-backdrop.open { display: flex; }
.qna-modal-dialog {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    width: 512px;
    max-width: 100%;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}
/* Header */
.qna-modal-header {
    padding: 16px 20px 14px;
    border-bottom: 1px solid #e8ecf0;
    flex-shrink: 0;
}
.qna-modal-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.qna-modal-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a2b4a;
    margin: 0;
}
.qna-modal-close-x {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #9ca3af;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
    opacity: 0.7;
    transition: opacity 0.15s;
    font-family: sans-serif;
}
.qna-modal-close-x:hover { opacity: 1; }
.qna-modal-question {
    font-size: 14px;
    font-style: italic;
    color: #6b7280;
    margin: 0 0 12px;
}
.qna-modal-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}
.qna-modal-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}
.qna-modal-dots .mdot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.qna-modal-dots .mdot.filled { background: #ff6b35; }
.qna-modal-dots .mdot.empty { border: 1px solid #e8ecf0; }
.qna-modal-progress-text {
    font-size: 12px;
    font-weight: 700;
    color: #ff6b35;
}
/* Body */
.qna-modal-body {
    flex: 1;
    overflow-y: auto;
}
/* Answer Card */
.qna-answer-card {
    padding: 20px;
    border-bottom: 1px solid #f3f4f6;
}
.qna-answer-card:last-child { border-bottom: none; }
.qna-answer-card-header {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
}
.qna-answer-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 56px;
    flex-shrink: 0;
}
.qna-answer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.qna-answer-star-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #f59e0b;
    white-space: nowrap;
}
.qna-answer-info { 
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1; 
    min-width: 0; 
}
.qna-answer-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.qna-answer-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a2b4a;
}
.qna-adoption-badge {
    background: #dcfce7;
    color: #15803d;
    font-size: 12px;
    font-weight: 500;
    border-radius: 8px;
    padding: 2px 8px;
    white-space: nowrap;
}
.qna-answer-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.qna-answer-tag {
    background: rgba(255,107,53,0.08);
    color: #ff6b35;
    font-size: 12px;
    font-weight: 500;
    border-radius: 8px;
    padding: 2px 8px;
    white-space: nowrap;
    cursor: pointer;
}
.qna-answer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #9ca3af;
}
.qna-answer-body {
    font-size: 14px;
    color: #374151;
    line-height: 1.75;
    margin: 0 0 8px;
}
.qna-answer-charcount {
    text-align: right;
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
}
.qna-answer-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    border-top: 1px solid #f3f4f6;
    padding-top: 13px;
    margin-top: 12px;
}
.qna-answer-rate-btn {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 8px;
    height: 32px;
    padding: 0 13px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s;
    font-family: 'Arimo', 'Noto Sans KR', sans-serif;
}
.qna-answer-rate-btn:hover { background: #f3f4f6; }
.qna-answer-rate-btn.rated {
    background-color: #dcfce7;
    border-color: #86efac;
    color: #15803d;
    cursor: default;
}
.qna-answer-adopt-btn {
    height: 32px;
    padding: 0 13px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    border: none;
    border-radius: 8px;
    background: linear-gradient(90deg, #ff6b35, #ff8c5a);
    box-shadow: 0 3px 5px rgba(255, 107, 53, 0.3);
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: 'Arimo', 'Noto Sans KR', sans-serif;
}
.qna-answer-adopt-btn:hover { opacity: 0.85; }

/* Footer */
.qna-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid #e8ecf0;
    flex-shrink: 0;
}
.qna-modal-footer-text {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}
.qna-modal-close-btn {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: color 0.15s;
    font-family: 'Arimo', 'Noto Sans KR', sans-serif;
}
.qna-modal-close-btn:hover { color: #374151; }

/* ── Adopted State ── */
.qna-answer-card.adopted {
    background: #fff9f7;
    border: 2px solid #ff6b35;
    border-bottom-width: 1px;
    border-radius: 0;
    margin: -1px 0 0; /* 기존 border-bottom과 겹침 방지 */
}
.qna-answer-card.adopted:last-child { border-bottom: 2px solid #ff6b35; }
.qna-answer-card button {
    cursor: default;
}
.qna-adopted-banner {
    background: linear-gradient(90deg, #ff6b35 0%, #ff7a43 55%, #ff8c5a 100%);
    border-radius: 0;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin: -20px -20px 20px;
}
.qna-answer-adopt-btn.adopted {
    background: #059669 !important;
    opacity: 0.5;
    box-shadow: none;
    cursor: default;
}
.qna-answer-adopt-btn:disabled:not(.adopted) {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 1;
}

/* ===== QnA Mobile Bottom Navigation ===== */
.qna-mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #1a2b4a;
    border-top: 1px solid rgba(255,255,255,0.12);
    z-index: 150;
}
.qna-mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    transition: color 0.2s;
    height: 100%;
}
.qna-mobile-nav-icon { font-size: 20px; line-height: 1; }
.qna-mobile-nav-label { font-size: 10px; font-weight: 500; }
.qna-mobile-nav-btn.active { color: #ff6b35; }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .stat-cards-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .quick-link-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .qna-sidebar { display: none; }
    .qna-mobile-nav { display: flex; }
    .main-content { padding: 24px 32px 80px; gap: 24px; }
    .qna-content-body { padding: 20px 16px; }
    .qna-content-header { padding: 16px 20px; }
}

@media (max-width: 768px) {
    .main-content { padding: 20px 20px 80px; gap: 20px; }
    .onboarding-banner { flex-direction: column; align-items: flex-start; }
    .onboarding-steps { flex-wrap: wrap; gap: 10px; }
}

@media (max-width: 600px) {
    .main-content { padding: 16px 16px 80px; gap: 16px; }
    .onboarding-banner { padding: 16px; }
    .onboarding-btn { display: none; }
    .stat-cards-row,
    .quick-link-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .question-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .question-card-bottom {
        flex-direction: column;
        gap: 12px;
    }
    .answer-btn { width: 100%; }
}

@media (max-width: 480px) {
    .main-content { padding: 12px 12px 80px; }
    .stat-cards-row,
    .quick-link-row {
        grid-template-columns: 1fr;
    }
    .qna-content-title { font-size: 20px; }
    .modal-overlay { padding: 0; align-items: flex-end; }
    .modal-box {
        max-width: 100%;
        max-height: 92vh;
        border-radius: 20px 20px 0 0;
    }
}