/* 라온하루노트 — 학부모 /r/{token} 전용 (매일 발송되는 가벼운 데일리 리포트) */

@import url('https://fonts.googleapis.com/css2?family=Gowun+Batang:wght@400;700&family=Gowun+Dodum&display=swap');

.note-root {
    --paper: #FAF7F2;
    --surface: #FFFFFF;
    --ink: #211E33;
    --muted: #7A7392;
    --muted-2: #A39CB8;
    --line: #E9E2D3;
    --brand: #332C6B;
    --brand-soft: #EEEBFB;
    --good: #1F8A5F;
    --good-soft: #E4F5EC;
    --bad: #C1483C;
    --bad-soft: #FBEAE7;
    --shadow: 0 1px 2px rgba(33, 30, 51, .04), 0 8px 24px rgba(33, 30, 51, .06);

    background: var(--paper);
    color: var(--ink);
    font-family: 'Gowun Dodum', sans-serif;
    padding: 28px 16px 40px;
    box-sizing: border-box;
}

.note-sheet {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
}

/* ── 상단: 워드마크 ── */
.note-masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.note-wordmark {
    font-family: 'Gowun Dodum', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .18em;
    color: var(--brand);
}
.note-wordmark span { color: var(--muted-2); font-weight: 400; letter-spacing: .1em; }
.note-masthead-tag { font-size: 11px; color: var(--muted-2); letter-spacing: .02em; }

/* ── 인사 (레터 오프닝) ── */
.note-greeting { padding: 20px 0 18px; }
.note-dateline { font-size: 12px; color: var(--muted); letter-spacing: .02em; margin-bottom: 6px; }
.note-student-name {
    font-family: 'Gowun Batang', serif;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
    word-break: keep-all;
}
.note-meta-row {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--muted);
}
.note-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 100px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .01em;
    background: var(--page-bg, #F3F1EA);
    color: var(--muted);
}
.note-pill.att-출석 { background: var(--good-soft); color: var(--good); }
.note-pill.att-지각 { background: #FEF3E2; color: #B4761F; }
.note-pill.att-결석 { background: var(--bad-soft); color: var(--bad); }
.note-pill.att-조퇴 { background: var(--brand-soft); color: var(--brand); }
.note-pill.pill-good { background: var(--good-soft); color: var(--good); }
.note-pill.pill-bad { background: var(--bad-soft); color: var(--bad); }
.note-meta-time { font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

/* ── 섹션 공통 ── */
.note-section { padding: 16px 0; border-bottom: 1px solid var(--line); }
.note-eyebrow {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    color: var(--brand);
    margin-bottom: 10px;
}
.note-eyebrow-num { color: var(--muted-2); font-weight: 400; letter-spacing: 0; }
.note-section-body { font-size: 13.5px; line-height: 1.65; color: var(--ink); }
.note-section-body p { margin: 0 0 6px; }
.note-section-body p:last-child { margin-bottom: 0; }
.note-section-body ul { margin: 0; padding-left: 1.15em; list-style: disc; }
.note-section-body li { margin-bottom: 5px; padding-left: 2px; }
.note-section-body li:last-child { margin-bottom: 0; }
.note-section-body li::marker { color: var(--brand); }
.note-empty { margin: 0; color: var(--muted-2); font-size: 12.5px; }
.note-memo { white-space: pre-wrap; }
.note-unit-chip {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--brand);
    background: var(--brand-soft);
    padding: 2px 8px;
    border-radius: 6px;
    margin-right: 7px;
}

/* ── 궁금한 점 남기기 ── */
.note-ask { padding-top: 22px; }
.note-ask-label { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.note-ask-box {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 100px;
    padding: 6px 6px 6px 16px;
    background: var(--surface);
}
.note-ask-box input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--ink);
    font-family: 'Gowun Dodum', sans-serif;
    font-size: 13.5px;
    outline: none;
    min-width: 0;
}
.note-ask-box input::placeholder { color: var(--muted-2); }
.note-ask-send {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    padding: 0;
}
.note-ask-send svg { width: 14px; height: 14px; }
.note-ask-send:disabled { opacity: .5; }

/* ── 이전 대화 ── */
.note-thread { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.note-msg {
    max-width: 86%;
    padding: 10px 13px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.55;
    word-break: break-word;
}
.note-msg.role-parent {
    align-self: flex-end;
    background: var(--brand);
    color: #fff;
    border-radius: 12px 12px 2px 12px;
}
.note-msg.role-teacher {
    align-self: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px 12px 12px 2px;
}
.note-msg-time { display: block; font-size: 10px; opacity: .65; margin-top: 4px; }

/* ── 하단 ── */
.note-foot { padding-top: 18px; text-align: center; }
.note-foot-text { font-size: 11.5px; color: var(--muted-2); line-height: 1.6; }
.note-foot-text strong { color: var(--brand); font-weight: 700; }

@media (max-width: 400px) {
    .note-student-name { font-size: 17px; }
}
