/* ============================================
   아동 발달 관찰일지 생성기 — style.css
   ============================================ */

.header-section {
    margin-bottom: 24px;
}
.header-section h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark, #2d3148);
    margin-bottom: 8px;
}
.header-section p {
    color: var(--text-gray, #666);
    font-size: 1rem;
}
.geo-summary-box {
    font-size: 0.96rem;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px 20px;
    border-radius: 14px;
    color: #333;
    max-width: 700px;
    margin: 16px auto 0 auto;
    border-left: 5px solid #4c6ef5;
    text-align: left;
    line-height: 1.6;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.obs-card {
    background: #ffffff;
    border-radius: 22px;
    padding: 26px 28px;
    margin-bottom: 20px;
    border: 2px solid #f1f3f5;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.05);
}

.obs-step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}
.obs-step-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
    color: #2d3148;
}
.obs-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4c6ef5, #7048e8);
    color: #fff;
    font-weight: 800;
    font-size: 0.88rem;
    flex-shrink: 0;
}

.obs-group {
    margin-bottom: 20px;
}
.obs-label {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: #3b4056;
    margin-bottom: 10px;
}
.obs-opt {
    font-size: 0.8rem;
    font-weight: 400;
    color: #888;
}

/* 연령 칩 */
.obs-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.obs-chip {
    padding: 10px 18px;
    border-radius: 50px;
    border: 2px solid #e9ecef;
    background: #f8f9fa;
    color: #495057;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
}
.obs-chip:hover {
    border-color: #4c6ef5;
    color: #4c6ef5;
    background: #fff;
}
.obs-chip.active {
    background: linear-gradient(135deg, #4c6ef5, #7048e8);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(76, 110, 245, 0.3);
}

/* 6대 영역 그리드 */
.obs-domain-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.obs-domain-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 16px;
    border: 2px solid #e9ecef;
    background: #fafbfc;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: all 0.18s;
}
.obs-domain-btn:hover {
    border-color: #4c6ef5;
    background: #fff;
    transform: translateY(-1px);
}
.obs-domain-btn.active {
    border-color: #4c6ef5;
    background: #edf2ff;
    box-shadow: 0 4px 14px rgba(76, 110, 245, 0.16);
}
.obs-domain-btn .d-emoji {
    font-size: 1.4rem;
    margin-bottom: 4px;
}
.obs-domain-btn .d-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #2d3148;
    margin-bottom: 2px;
}
.obs-domain-btn .d-sub {
    font-size: 0.76rem;
    color: #6b7280;
}

/* 우리 반 원아 불러오기 & 원아 칩 */
.btn-import-kids {
    padding: 8px 14px;
    border-radius: 50px;
    border: 2px solid #4c6ef5;
    background: #edf2ff;
    color: #364fc7;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-import-kids:hover {
    background: #4c6ef5;
    color: #fff;
}
.obs-kid-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 12px;
    background: #f8f9ff;
    border-radius: 14px;
    border: 1px dashed rgba(76, 110, 245, 0.3);
}
.obs-kid-chip {
    padding: 6px 14px;
    border-radius: 50px;
    border: 1.5px solid #dbe4ff;
    background: #fff;
    color: #364fc7;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.obs-kid-chip:hover, .obs-kid-chip.active {
    background: #4c6ef5;
    color: #fff;
    border-color: #4c6ef5;
}

.obs-kid-input-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.obs-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s;
}
.obs-input:focus {
    border-color: #4c6ef5;
}
.obs-anon-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #555;
    cursor: pointer;
    user-select: none;
}
.obs-anon-toggle input {
    width: 17px;
    height: 17px;
    accent-color: #4c6ef5;
}

/* 빠른 관찰 행동 칩 */
.obs-behavior-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.obs-b-chip {
    padding: 8px 14px;
    border-radius: 50px;
    border: 1.5px solid #dee2e6;
    background: #f8f9fa;
    color: #343a40;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.16s;
}
.obs-b-chip:hover {
    border-color: #4c6ef5;
    color: #4c6ef5;
    background: #fff;
}
.obs-b-chip.selected {
    background: #4c6ef5;
    border-color: #4c6ef5;
    color: #fff;
    box-shadow: 0 3px 10px rgba(76, 110, 245, 0.28);
}

.obs-textarea {
    width: 100%;
    border: 2px solid #e9ecef;
    border-radius: 14px;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 0.92rem;
    line-height: 1.65;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}
.obs-textarea:focus {
    border-color: #4c6ef5;
}

/* 생성 버튼 2트랙 바 */
.obs-generate-bar {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px dashed #e9ecef;
}
.btn-obs-random {
    padding: 13px 22px;
    border-radius: 14px;
    border: 2px solid #56ab2f;
    background: #f4fce3;
    color: #2b8a3e;
    font-family: inherit;
    font-size: 0.96rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-obs-random:hover {
    background: #e9fac8;
    transform: translateY(-1px);
}
.btn-obs-ai {
    padding: 13px 24px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #4c6ef5, #7048e8);
    color: #fff;
    font-family: inherit;
    font-size: 0.96rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(76, 110, 245, 0.32);
    transition: all 0.2s;
}
.btn-obs-ai:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}
.btn-obs-ai:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}
.pro-badge-inline {
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    margin-left: 4px;
}

/* 결과 카드 */
.obs-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}
.obs-quick-refine {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.btn-refine {
    padding: 7px 13px;
    border-radius: 50px;
    border: 1.5px solid #dbe4ff;
    background: #f8f9ff;
    color: #364fc7;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
}
.btn-refine:hover {
    background: #4c6ef5;
    color: #fff;
    border-color: #4c6ef5;
}

.obs-doc-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 18px;
}
.obs-doc-box {
    border: 1.5px solid #e9ecef;
    border-radius: 16px;
    overflow: hidden;
    background: #fcfcfd;
}
.obs-doc-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: #f1f3f9;
    font-size: 0.9rem;
    font-weight: 800;
    color: #2d3148;
}
.btn-mini-copy {
    padding: 5px 12px;
    border-radius: 50px;
    border: 1px solid #ced4da;
    background: #fff;
    color: #495057;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}
.btn-mini-copy:hover {
    border-color: #4c6ef5;
    color: #4c6ef5;
}
.obs-doc-textarea {
    width: 100%;
    border: none;
    padding: 16px 18px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.75;
    color: #2d3148;
    background: #fff;
    resize: vertical;
    outline: none;
}

.btn-obs-copy-all {
    width: 100%;
    padding: 15px 20px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #2b8a3e, #40c057);
    color: #fff;
    font-family: inherit;
    font-size: 1.02rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(43, 138, 62, 0.25);
    transition: all 0.2s;
}
.btn-obs-copy-all:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.btn-obs-action-sub, .btn-obs-action-print {
    flex: 1;
    min-width: 170px;
    padding: 14px 16px;
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-obs-action-sub {
    border: 2px solid #4c6ef5;
    background: #edf2ff;
    color: #364fc7;
}
.btn-obs-action-sub:hover {
    background: #4c6ef5;
    color: #fff;
}
.btn-obs-action-print {
    border: 2px solid #1e293b;
    background: #1e293b;
    color: #fff;
}
.btn-obs-action-print:hover {
    background: #0f172a;
    transform: translateY(-1px);
}

/* 무료 vs PRO 비교 아코디언 */
.obs-compare-banner {
    margin-top: 16px;
    padding: 11px 16px;
    border-radius: 12px;
    background: #f8faff;
    border: 1.5px dashed #bac8ff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.86rem;
    color: #334155;
    cursor: pointer;
}
.obs-compare-banner:hover {
    background: #edf2ff;
}
.obs-compare-detail {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}
.obs-compare-detail.open {
    display: grid;
}
.obs-compare-col {
    padding: 14px;
    border-radius: 14px;
    font-size: 0.84rem;
    line-height: 1.55;
}
.obs-compare-col.free {
    background: #f8f9fa;
    border: 1.5px solid #dee2e6;
    color: #495057;
}
.obs-compare-col.pro {
    background: linear-gradient(145deg, #f3f0ff, #edf2ff);
    border: 1.5px solid #7048e8;
    color: #1e293b;
}
.obs-compare-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 0.74rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.obs-compare-badge.free { background: #e9ecef; color: #495057; }
.obs-compare-badge.pro  { background: #7048e8; color: #fff; }
.obs-compare-col p { margin: 0 0 8px 0; }
.obs-compare-foot { font-size: 0.76rem; font-weight: 700; color: #4c6ef5; }

/* Step 4: 관찰일지 보관함 & 6대 영역 달성 매트릭스 */
.obs-coverage-table-wrap {
    overflow-x: auto;
    border: 1.5px solid #e9ecef;
    border-radius: 14px;
    background: #fafbfc;
}
.obs-coverage-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
    font-size: 0.82rem;
}
.obs-coverage-table th, .obs-coverage-table td {
    padding: 9px 8px;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
}
.obs-coverage-table th {
    background: #f1f3f9;
    color: #334155;
    font-weight: 800;
    white-space: nowrap;
}
.obs-coverage-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 9px;
    border-radius: 99px;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.15s;
}
.obs-coverage-pill.done {
    background: #d3f9d8;
    color: #2b8a3e;
}
.obs-coverage-pill.todo {
    background: #f1f3f5;
    color: #868e96;
}
.obs-coverage-pill.todo:hover {
    background: #edf2ff;
    color: #4c6ef5;
}

.obs-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.obs-history-item {
    border: 1.5px solid #e9ecef;
    border-radius: 14px;
    padding: 14px 16px;
    background: #fff;
    transition: border-color 0.15s;
}
.obs-history-item:hover {
    border-color: #bac8ff;
}
.obs-history-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.obs-history-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.84rem;
    font-weight: 800;
    color: #1e293b;
}
.obs-history-tag {
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 0.73rem;
    font-weight: 700;
    background: #edf2ff;
    color: #364fc7;
}
.obs-history-preview {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.55;
    margin: 0;
}

/* A4 인쇄 전용 시트 */
.obs-print-sheet {
    display: none;
}

@media print {
    body * {
        visibility: hidden !important;
    }
    .breadcrumb-header, .no-print, #hago-fb-root, .toast-notification {
        display: none !important;
    }
    #obs-print-sheet, #obs-print-sheet * {
        visibility: visible !important;
    }
    #obs-print-sheet {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 10mm 12mm;
        background: #fff !important;
        color: #000 !important;
        font-family: 'Pretendard', 'Malgun Gothic', sans-serif;
    }
    .obs-a4-title {
        text-align: center;
        font-size: 20pt;
        font-weight: 800;
        margin: 0 0 14px 0;
        letter-spacing: 2px;
    }
    .obs-a4-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 14px;
        font-size: 10.5pt;
    }
    .obs-a4-table th, .obs-a4-table td {
        border: 1px solid #222;
        padding: 9px 12px;
        vertical-align: top;
        line-height: 1.65;
    }
    .obs-a4-table th {
        background: #f1f3f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        width: 115px;
        text-align: center;
        font-weight: 700;
        vertical-align: middle;
    }
}

@media (max-width: 768px) {
    .obs-domain-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .obs-compare-detail.open {
        grid-template-columns: 1fr;
    }
    .obs-card {
        padding: 20px 18px;
    }
    .obs-generate-bar {
        flex-direction: column;
    }
    .btn-obs-random, .btn-obs-ai {
        width: 100%;
        text-align: center;
    }
}
@media (max-width: 480px) {
    .obs-domain-grid {
        grid-template-columns: 1fr;
    }
}
