:root {
    --bg-black: #000000;
    --bg-card: #15181e;
    --bg-card-hover: #1c2028;
    --bg-input: #1f232b;
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --point-color: #bb86fc;
    --border-color: #525866;
    --border-hover: #bb86fc;
    --success-color: #30d158;
    --danger-color: #ff453a;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { background-color: var(--bg-black); color: var(--text-main); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; display: flex; justify-content: center; }
.mobile-container { width: 100%; max-width: 480px; height: 100vh; display: flex; flex-direction: column; border-left: 1px solid var(--border-color); border-right: 1px solid var(--border-color); background-color: var(--bg-black); }
header { padding: 14px 18px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
header h1 span { color: var(--point-color); }
.brand-lockup{display:flex;align-items:center;gap:9px;min-width:0}.brand-lockup h1{white-space:nowrap}
.admin-badge{display:inline-flex;align-items:center;padding:3px 7px;border:1px solid #fbbf24;border-radius:999px;background:#78350f;color:#fef3c7;font-size:.62rem;font-weight:900;letter-spacing:.08em;box-shadow:0 0 0 2px rgba(251,191,36,.12)}
.admin-badge[hidden]{display:none!important}
.tab-menu { display: flex; gap: 8px; }
.tab-btn { background: none; border: none; color: var(--text-muted); font-size: 0.95rem; font-weight: 600; padding: 6px 12px; cursor: pointer; transition: color 0.2s; }
.tab-btn.active { color: var(--text-main); border-bottom: 2px solid var(--point-color); }
main { flex: 1; overflow-y: auto; padding: 12px 14px; scrollbar-width: thin; scrollbar-color: var(--border-color) transparent; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* 입력 카드 공통 — 밝은 테두리와 컴팩트한 여백 */
.input-card { background-color: var(--bg-card); border-radius: 12px; padding: 13px 14px; margin-bottom: 12px; border: 1.5px solid var(--border-color); box-shadow: 0 4px 12px rgba(0,0,0,0.35); }
.input-card h3 { font-size: 0.92rem; margin-bottom: 8px; color: #fff; font-weight: 600; }
input[type="text"], input[type="number"], input[type="date"], input[type="month"], input[type="tel"], select, textarea {
    width: 100%;
    background-color: var(--bg-input);
    border: 1.2px solid var(--border-color);
    border-radius: 7px;
    color: #fff;
    padding: 7px 10px;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s;
    min-height: 36px;
}
textarea { resize: none; height: 60px; min-height: 50px; }
input:focus, textarea:focus, select:focus { border-color: var(--point-color); }
.btn-submit { display: block; width: 100%; background-color: #fff; color: #000; border: 1px solid #ffffff; border-radius: 7px; padding: 9px 12px; font-weight: 600; font-size: 0.88rem; margin-top: 8px; cursor: pointer; transition: background-color 0.2s, opacity 0.2s; }
.btn-submit:active { opacity: 0.8; }
.btn-submit:disabled { opacity: 0.4; cursor: not-allowed; }

/* 파일 첨부 바 */
.file-attach-bar { margin-top: 10px; }
.btn-file-select { display: inline-flex; align-items: center; gap: 6px; background-color: var(--bg-input); border: 1px dashed var(--border-color); color: var(--text-muted); padding: 8px 12px; border-radius: 8px; font-size: 0.82rem; cursor: pointer; transition: 0.2s; width: 100%; justify-content: center; }
.btn-file-select:hover { border-color: var(--point-color); color: var(--text-main); }
.file-preview-wrap { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding: 8px 12px; background-color: var(--bg-input); border: 1px solid var(--point-color); border-radius: 8px; gap: 8px; }
.file-preview-info { display: flex; align-items: center; gap: 8px; overflow: hidden; flex: 1; }
.preview-thumb { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border-color); flex-shrink: 0; }
.preview-icon { font-size: 1.1rem; flex-shrink: 0; }
.preview-filename { font-size: 0.8rem; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-file-clear { background: none; border: none; color: var(--danger-color); font-size: 1.1rem; font-weight: bold; cursor: pointer; padding: 0 6px; }

/* 타임라인 헤더 및 개수 */
.timeline-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; margin-top: 20px; }
.timeline-header h3 { font-size: 0.95rem; display: flex; align-items: center; gap: 6px; }
.count-badge { background-color: var(--bg-input); color: var(--point-color); font-size: 0.75rem; padding: 2px 7px; border-radius: 10px; border: 1px solid var(--border-color); font-weight: normal; }

/* 타임라인 카드 - 마우스 호버 및 구분 스타일 대폭 강화 */
.timeline { display: flex; flex-direction: column; gap: 14px; }
.log-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}
/* 마우스 on (hover) 시 명확한 구분 표시 */
.log-item:hover {
    border-color: var(--border-hover);
    background-color: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 12px rgba(187, 134, 252, 0.15);
}

/* 카드 상단 헤더: 작성시간 & 액션 버튼 */
.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
    margin-bottom: 12px;
}
.log-time {
    font-size: 0.78rem;
    color: var(--point-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}
.log-actions {
    display: flex;
    gap: 6px;
}
.btn-log-action {
    background-color: #20242e;
    border: 1.2px solid #5a6170;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #e5e7eb;
}
.btn-log-action:hover {
    color: #fff;
    border-color: #93c5fd;
    background-color: #2b303d;
}
.btn-delete-log{display:inline-flex;align-items:center;justify-content:center;background:#2b2024;color:#fca5a5;border:1.2px solid #7f3b45;border-radius:6px;padding:4px 10px;font-size:.75rem;font-weight:600;cursor:pointer;transition:.2s}
.btn-delete-log:hover{background:#3a2429;color:#fecaca;border-color:#ef4444}
.btn-log-delete {
    border-color: #7f3b3b;
    color: #fca5a5;
}
.btn-log-delete:hover {
    color: #fff;
    border-color: var(--danger-color);
    background-color: rgba(255, 69, 58, 0.25);
}

/* 카드 본문 */
.log-content {
    font-size: 0.92rem;
    line-height: 1.6;
    white-space: pre-wrap;
    color: var(--text-main);
    word-break: break-all;
}

/* 첨부 파일 뷰 */
.log-media-box {
    margin-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, 0.06);
    padding-top: 10px;
}
.log-image-wrap {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    max-height: 260px;
    background-color: #000;
    border: 1px solid var(--border-color);
    cursor: zoom-in;
}
.log-image-wrap img {
    width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}
.log-image-wrap:hover img {
    transform: scale(1.02);
}
.log-file-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-decoration: none;
    transition: 0.2s;
    word-break: break-all;
}
.log-file-link:hover {
    border-color: var(--point-color);
    color: #fff;
}

/* 2. Haru스터디 영상 섹션 */
.video-section { margin-bottom: 16px; }
.video-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.video-section-header h3 { font-size: 0.95rem; margin-bottom: 0; display: flex; align-items: center; gap: 6px; }
.btn-toggle-list { background: none; border: 1px solid var(--border-color); color: var(--text-muted); font-size: 0.75rem; padding: 3px 8px; border-radius: 6px; cursor: pointer; transition: 0.2s; }
.btn-toggle-list:hover { color: var(--text-main); border-color: var(--point-color); }

/* 2열 컴팩트 그리드 목록 */
.video-grid-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: 122px;
    overflow-y: auto;
    padding: 2px 2px 6px 2px;
    margin-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}
.video-grid-list.expanded { max-height: 280px; }
.video-empty-notice { grid-column: span 2; text-align: center; color: var(--text-muted); font-size: 0.85rem; padding: 16px 0; background-color: var(--bg-card); border-radius: 8px; border: 1px dashed var(--border-color); }
.video-card-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    text-align: left;
    transition: all 0.15s ease-in-out;
    min-height: 48px;
    user-select: none;
}
.video-card-item:hover { border-color: var(--point-color); background-color: var(--bg-card-hover); }
.video-card-item:active { transform: scale(0.97); }
.video-card-item .card-icon { font-size: 0.75rem; color: var(--text-muted); flex-shrink: 0; width: 14px; text-align: center; }
.video-card-item .card-title {
    font-size: 0.82rem;
    line-height: 1.3;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
    flex: 1;
}
.video-card-item.active { background-color: rgba(187, 134, 252, 0.12); border-color: var(--point-color); }
.video-card-item.active .card-icon { color: var(--point-color); }
.video-card-item.active .card-title { color: #ffffff; font-weight: 600; }

.player-wrapper { position: relative; width: 100%; padding-top: 56.25%; background-color: var(--bg-card); border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); }
.player-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.selected-video-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding: 10px 12px; background-color: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; gap: 8px; }
.selected-video-title { font-size: 0.88rem; font-weight: 600; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.btn-edit-video { background-color: #20242e; border: 1.2px solid #5a6170; color: #a5b4fc; padding: 5px 11px; border-radius: 6px; font-size: 0.78rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: 0.2s; }
.btn-edit-video:hover { border-color: var(--point-color); background-color: rgba(187, 134, 252, 0.15); color: #fff; }

.toggle-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.toggle-header h3 { margin-bottom: 0; }
.script-box { margin-top: 10px; padding: 10px 12px; background-color: var(--bg-input); border-radius: 8px; border: 1.2px solid var(--border-color); font-size: 0.88rem; line-height: 1.5; white-space: pre-wrap; }
.result-box { margin-top: 8px; font-size: 0.85rem; line-height: 1.4; }
.vocab-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border-color); font-size: 0.88rem; }
.vocab-item .word { color: var(--point-color); font-weight: 600; }

/* 모달 공통 */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.75); display: flex; justify-content: center; align-items: center; z-index: 1000; padding: 16px; backdrop-filter: blur(4px); }
.modal-card { width: 100%; max-width: 440px; background-color: var(--bg-card); border: 1.5px solid #5a6170; border-radius: 12px; padding: 16px 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.modal-header h3 { font-size: 0.95rem; color: #fff; font-weight: 600; margin: 0; }
.btn-close-modal { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; padding: 4px 8px; }
.btn-close-modal:hover { color: #fff; }
.input-label { display: block; font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; margin-bottom: 3px; }
.modal-actions { display: flex; gap: 8px; margin-top: 10px; }
.btn-cancel { display: block; width: 100%; background-color: var(--bg-input); color: #d1d5db; border: 1.2px solid #5a6170; border-radius: 7px; padding: 9px 12px; font-weight: 600; font-size: 0.88rem; margin-top: 8px; cursor: pointer; transition: 0.2s; }
.btn-cancel:hover { color: #fff; border-color: #9ca3af; }

/* 수정 모달 내 기존 파일 표시 */
.existing-file-box { background-color: var(--bg-input); border: 1px solid var(--border-color); border-radius: 8px; padding: 10px; margin-top: 10px; }
.existing-file-box .file-label { font-size: 0.75rem; color: var(--text-muted); display: block; margin-bottom: 4px; }
.existing-file-content { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.existing-filename { font-size: 0.82rem; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.checkbox-label { font-size: 0.78rem; color: var(--danger-color); cursor: pointer; display: flex; align-items: center; gap: 4px; white-space: nowrap; }

/* 이미지 라이트박스 */
.lightbox-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.9); display: flex; justify-content: center; align-items: center; z-index: 2000; padding: 16px; cursor: zoom-out; }
.lightbox-image { max-width: 95%; max-height: 90vh; object-fit: contain; border-radius: 8px; box-shadow: 0 0 24px rgba(0,0,0,0.8); }

/* HaruLog v1.5.0 (2026-10-27) — 메뉴 확장 및 모바일 화면 */
.mobile-container { height: 100vh; height: 100dvh; }
.app-header { display: block; flex-shrink: 0; padding: max(14px, env(safe-area-inset-top)) 16px 14px; max-height: 48vh; overflow-y: auto; }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.header-bar h1 { font-size: 1.5rem; }
.menu-toggle { background: var(--bg-input); color: var(--text-main); border: 1px solid var(--border-color); border-radius: 10px; padding: 10px 12px; min-height: 44px; font-size: .85rem; cursor: pointer; }
.menu-toggle[aria-expanded="true"] { border-color: var(--point-color); }
.tab-menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.tab-menu[hidden] { display: none; }
.tab-btn { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 48px; text-align: left; padding: 12px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-card); font-size: .88rem; overflow-wrap: anywhere; }
.tab-btn.active { border: 1px solid var(--point-color); background: rgba(187,134,252,.12); }
.tab-btn:hover, .menu-toggle:hover { border-color: var(--point-color); }
.tab-btn:focus-visible, .menu-toggle:focus-visible { outline: 2px solid var(--point-color); outline-offset: 2px; }
main { min-height: 0; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.page-heading h2 { font-size: 1.1rem; }
.page-heading h2:focus { outline: none; }
.app-version { color: var(--text-muted); font-size: .72rem; }
.module-placeholder { text-align: center; padding: 32px 20px; }
.module-icon { display: block; font-size: 2rem; margin-bottom: 14px; }
.module-status { display: inline-block; border: 1px solid var(--border-color); border-radius: 20px; padding: 4px 10px; color: var(--point-color); font-size: .75rem; margin-bottom: 14px; }
.module-placeholder p { color: var(--text-muted); font-size: .88rem; line-height: 1.7; word-break: keep-all; }
@media (max-width: 340px) {
    .app-header { padding-left: 12px; padding-right: 12px; }
    .tab-btn { padding: 10px 8px; font-size: .82rem; gap: 6px; }
}

/* HaruLog v1.6.0 — 골프 라운드 */
.score-form[hidden], #scorePhotoPreview[hidden], #scoreRemovePhotoLabel[hidden], #scoreOcrTextWrap[hidden] { display: none; }
.score-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-bottom: 18px; }
.score-summary > div { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.score-summary span { font-size: .75rem; color: var(--text-muted); }
.score-summary strong { text-align: right; font-size: 1.2rem; }
.score-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 8px 0 6px 0; }
.score-toolbar h3 { font-size: .92rem; margin: 0; }
.score-form > label, .score-fields label { display: block; font-size: .78rem; color: var(--text-muted); margin: 5px 0; min-width: 0; }
.score-form input, .score-form textarea { margin-top: 4px; }
.score-form input[type="date"], .score-form input[type="number"] { width: 100%; min-width: 0; background: var(--bg-input); color: var(--text-main); color-scheme: dark; border: 1.2px solid var(--border-color); padding: 7px 10px; border-radius: 7px; font: inherit; min-height: 36px; }
.score-form input[type="number"] { text-align: right; }
.score-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 6px; }
.score-points { grid-template-columns: repeat(3,minmax(0,1fr)); align-items: center; }
.score-total { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.score-total span { font-size: .8rem; color: var(--text-muted); }
.score-total strong { font-size: 1.7rem; color: var(--point-color); }
.score-help { font-size: .78rem; color: var(--text-muted); line-height: 1.6; overflow-wrap: anywhere; }
.score-photo-details { border: 1px solid var(--border-color); border-radius: 10px; padding: 12px; margin: 16px 0; }
#scorePhoto { width: 100%; font-size: .8rem; margin: 12px 0; }
.score-photo-preview { display: block; width: 100%; max-height: 250px; object-fit: contain; border-radius: 8px; margin: 8px 0; }
.score-remove { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--danger-color); }
.score-companion { display: grid; grid-template-columns: minmax(0,1fr) 80px auto; gap: 6px; align-items: center; margin: 8px 0; }
.score-companion input { min-width: 0; }
.score-result { display: flex; justify-content: space-between; align-items: center; margin: 14px 0; gap: 10px; }
.score-result > span { min-width: 0; overflow-wrap: anywhere; }
.score-result small { display: block; margin-top: 6px; font-size: .78rem; color: var(--text-muted); font-weight: normal; }
.score-result strong { font-size: 2rem; color: var(--point-color); text-align: right; }
.score-result strong small { display: inline; margin-left: 4px; }
.score-round details { border-top: 1px solid var(--border-color); padding-top: 12px; }
.score-round details p { font-size: .85rem; margin-top: 10px; line-height: 1.6; }
.score-memo { white-space: pre-wrap; overflow-wrap: anywhere; }
.score-round h3 { overflow-wrap: anywhere; }
.score-photo-link img { display: block; width: 100%; max-height: 240px; object-fit: contain; margin-top: 12px; border-radius: 8px; }
.score-candidate { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid var(--border-color); color: var(--text-main); background: var(--bg-input); text-align: left; font-size: .8rem; margin-top: 8px; cursor: pointer; overflow-wrap: anywhere; }
.score-candidate:hover { border-color: var(--point-color); }
#scoreOcrText { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .75rem; max-height: 200px; overflow-y: auto; padding: 8px; }
.score-round-list { padding-top: 10px; }
.score-form summary, .score-round summary { font-size: .82rem; cursor: pointer; }

/* HaruLog v1.7.0 — 기록 경계 및 관리비 */
.timeline { gap: 18px; }
.log-item { border: 2px solid #626875; border-left: 4px solid #a593c8; background-color: #171a20; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
.log-header { border-bottom: 1px solid #4d5361; }
.log-item:hover { border-color: #bba4e0; background-color: #20232b; }
.invoice-form[hidden], #invoicePhotoPreview[hidden], #invoiceRemovePhotoLabel[hidden], #invoiceOcrWrap[hidden], #invoiceApplyOcr[hidden] { display:none; }
.invoice-form > label, .invoice-form .score-fields label, .invoice-filters label { display:block; font-size:.78rem; color:var(--text-muted); margin:6px 0; min-width:0; }
.invoice-form input:not([type="checkbox"]), .invoice-form textarea, .invoice-form select, .invoice-filters input, .invoice-filters select { width:100%; min-width:0; margin-top:4px; padding:7px 10px; background:var(--bg-input); color:var(--text-main); color-scheme:dark; border:1.2px solid var(--border-color); border-radius:7px; font:inherit; min-height:36px; }
.invoice-form input[type="number"] { text-align:right; }
.invoice-item-row { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(100px,1fr); gap:8px; align-items:center; margin:8px 0; }
.invoice-item-row input { font-size:.78rem !important; padding:9px 6px !important; }
.invoice-sum { display:flex; justify-content:space-between; align-items:center; gap:10px; margin:16px 0; }
.invoice-sum span { color:var(--text-muted); font-size:.8rem; }
.invoice-sum strong { color:var(--point-color); text-align:right; overflow-wrap:anywhere; }
.invoice-warning { color:#ffd28a; }
.invoice-meter-details { margin:16px 0; padding:12px; border:1px solid var(--border-color); border-radius:10px; }
.invoice-meter h4 { margin-top:12px; font-size:.85rem; }
.invoice-filters { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:8px; align-items:center; }
.invoice-paid { padding:3px 8px; border:1px solid #946c32; color:#ffd28a; border-radius:14px; font-size:.72rem; white-space:nowrap; }
.invoice-paid.is-paid { color:var(--success-color); border-color:#326b44; }
.invoice-card h3 { overflow-wrap:anywhere; }
.invoice-card summary, .invoice-form summary { cursor:pointer; font-size:.82rem; }
.invoice-card details { margin-top:12px; border-top:1px solid var(--border-color); padding-top:10px; }
.invoice-detail-line { display:flex; justify-content:space-between; gap:12px; margin:10px 0; font-size:.82rem; }
.invoice-detail-line span:first-child { overflow-wrap:anywhere; }
.invoice-detail-line span:last-child { text-align:right; white-space:nowrap; }
#invoiceOcrText, .invoice-ocr-source { white-space:pre-wrap; overflow-wrap:anywhere; max-height:240px; overflow-y:auto; font-size:.75rem; padding:10px 0; }
#invoiceSummary strong { font-size:.9rem; overflow-wrap:anywhere; }

/* HaruLog v1.8.0 — 성명·별명 및 선택 AI 보완 */
#scoreAiWrap[hidden], #invoiceAiButton[hidden] { display:none; }
#scoreInputMode { width:100%; background:var(--bg-input); color:var(--text-main); border:1px solid var(--border-color); border-radius:8px; padding:10px; margin-top:6px; }
.score-companion { grid-template-columns:minmax(0,1fr) minmax(0,1fr) 66px auto; gap:5px; }
.score-companion input { font-size:.76rem; padding:9px 6px; }
.score-companion .btn-log-action { padding:6px; }
@media(max-width:360px) {
    .score-companion { grid-template-columns:minmax(0,1fr) minmax(0,1fr); padding:8px; border:1px solid var(--border-color); border-radius:8px; }
}

/* HaruLog v1.8.1 — 사진 판독 상태와 후보 목록 */
#scoreOcrStatus:not(:empty) { padding:12px; margin:12px 0; border:1px solid #78638f; border-radius:8px; color:#e0d7ec; background:#211d29; white-space:pre-wrap; }
.score-candidate-heading { margin:14px 0 8px; font-size:.9rem; color:var(--text-main); }

/* HaruLog v1.9.0 — 기본설정·홀별 입력·타수 그래프 */
#contactForm[hidden] { display:none; }
.settings-form label { display:block; color:var(--text-muted); font-size:.78rem; margin:6px 0; }
.settings-form input,.settings-form textarea { margin-top:4px; padding:7px 10px; min-height:36px; border:1.2px solid var(--border-color); border-radius:7px; }
.settings-form input[type="tel"] { width:100%; background:var(--bg-input); color:var(--text-main); border:1.2px solid var(--border-color); padding:7px 10px; border-radius:7px; min-height:36px; }
.contact-text { white-space:pre-wrap; overflow-wrap:anywhere; }
#scoreContactSelect { min-width:0; flex:1; padding:10px; background:var(--bg-input); color:var(--text-main); border:1px solid var(--border-color); border-radius:8px; }
.score-hole-section { border:1px solid var(--border-color); border-radius:10px; padding:12px; margin:14px 0; }
.score-hole-section legend { color:var(--point-color); font-size:.85rem; padding:0 6px; }
.score-hole-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.score-hole-grid label { min-width:0; color:var(--text-muted); font-size:.8rem; }
.score-hole-grid input { min-height:44px; }
#scoreFront[readonly],#scoreBack[readonly] { color:var(--point-color); }
.score-trend-graph { width:100%; margin:12px 0; }
.score-trend-graph svg { display:block; width:100%; height:auto; }
.trend-grid { stroke:var(--border-color); stroke-width:1; }
.trend-label { fill:#bfc1c9; font-size:11px; }
.trend-line { fill:none; stroke:var(--point-color); stroke-width:2.5; }
.trend-point { fill:var(--point-color); stroke:var(--bg-card); stroke-width:1.5; }
.score-trend-table { width:100%; border-collapse:collapse; font-size:.75rem; margin-top:10px; }
.score-trend-table td,.score-trend-table th { border-bottom:1px solid var(--border-color); padding:8px 4px; text-align:right; }
.score-trend-table td:first-child,.score-trend-table th:first-child { text-align:left; overflow-wrap:anywhere; }

/* HaruLog — 공과금 서브탭 & Haru스터디 언어 필터 & 단어장 */
.sub-tab-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.sub-tab-btn {
    flex: 1;
    padding: 9px 12px;
    border-radius: 8px;
    background: #1f2937;
    border: 1.2px solid #525866;
    color: #d1d5db;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.sub-tab-btn.active {
    background: #2563eb;
    border-color: #60a5fa;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

.study-lang-filter-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.lang-filter-btn {
    padding: 5px 11px;
    border-radius: 20px;
    background: #1f2937;
    border: 1.2px solid #525866;
    color: #d1d5db;
    font-size: 12.5px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}
.lang-filter-btn.active {
    background: var(--point-color, #fbbf24);
    border-color: #fde047;
    color: #000000;
    font-weight: 700;
}

.card-lang-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    margin-left: auto;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.card-lang-tag.lang-ID { background: rgba(239, 68, 68, 0.18); color: #f87171; border-color: rgba(239, 68, 68, 0.4); }
.card-lang-tag.lang-US { background: rgba(59, 130, 246, 0.18); color: #60a5fa; border-color: rgba(59, 130, 246, 0.4); }
.card-lang-tag.lang-JP { background: rgba(236, 72, 153, 0.18); color: #f472b6; border-color: rgba(236, 72, 153, 0.4); }
.card-lang-tag.lang-CN { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border-color: rgba(245, 158, 11, 0.4); }
.card-lang-tag.lang-ETC { background: rgba(156, 163, 175, 0.18); color: #9ca3af; border-color: rgba(156, 163, 175, 0.4); }

.vocab-video-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.btn-del-vocab {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
}
.btn-del-vocab:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* HaruLog v2.7.1: 홈 화면 공통 스타일 */
.home-form-row { display:flex; gap:8px; margin-bottom:12px; }
.home-form-row-top { display:flex; gap:8px; margin-top:8px; }
.home-field-wide { flex:2; }
.home-compact-actions { display:flex; gap:6px; }
.home-flex-fill { flex:1; }
.home-margin-top { margin-top:12px; }
.home-margin-bottom { margin-bottom:12px; }
.home-heading-close { margin-bottom:6px; }
.home-heading-gap { margin-bottom:8px; }
.home-caption-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:4px; }
.home-usage-label { font-size:0.85rem; color:#f59e0b; font-weight:700; }
.home-summary-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
/* HaruLog v2.8.1 - 펫스토리 */
.pet-subtabs{display:flex;gap:8px;margin-bottom:12px}
.pet-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.pet-fields label,.pet-pedigree-toolbar label{display:flex;flex-direction:column;gap:6px;font-size:.85rem;font-weight:700;color:var(--text-muted)}
.pet-field-wide{grid-column:1/-1}
.pet-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.pet-actions .btn-submit,.pet-actions .btn-cancel{margin-top:0}
.pet-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;margin-top:12px}
.pet-card{overflow:hidden;border:1px solid rgba(255,255,255,.11);border-radius:14px;background:rgba(255,255,255,.035)}
.pet-card>img,.pet-photo-empty{display:block;width:100%;height:160px;object-fit:cover;background:rgba(255,255,255,.04)}
.pet-photo-empty{display:grid;place-items:center;font-size:3rem}
.pet-card-body{padding:14px}.pet-card h4{margin:0 0 10px;font-size:1.05rem}
.pet-status-badge{display:inline-flex;align-items:center;min-height:25px;padding:2px 9px;border:1px solid #557092;border-radius:999px;background:#243248;color:#dce9ff;font-size:.78rem;font-weight:700;line-height:1.2}.pet-status-badge.status-active{border-color:#2e8b68;background:#193d32;color:#96e6c3}.pet-status-badge.status-deceased{border-color:#707784;background:#30343c;color:#d5d8de}.pet-status-badge.status-transferred{border-color:#a8792b;background:#49381d;color:#f3d28f}.pet-status-badge.status-inactive{border-color:#98505b;background:#46272d;color:#f2aeb8}
.pet-card dl{display:grid;grid-template-columns:auto 1fr;gap:4px 10px;margin:0;font-size:.82rem}
.pet-card dt{font-weight:700;color:var(--text-muted)}.pet-card dd{margin:0;overflow-wrap:anywhere}
.pet-pedigree-toolbar{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end}
.pet-pedigree-toolbar .btn-submit{margin-top:0}
.pet-pedigree-tree{overflow:auto;padding:4px}
.pedigree-branch>span{display:block;margin:5px 0;font-size:.72rem;font-weight:800;color:var(--text-muted)}
.pedigree-node{display:grid;grid-template-columns:44px 1fr;gap:9px;align-items:center;width:100%;min-width:190px;padding:10px 12px;border:0;border-left:4px solid #94a3b8;border-radius:10px;background:rgba(255,255,255,.055);color:inherit;text-align:left;cursor:pointer}
.pedigree-node:hover,.pedigree-node:focus-visible{background:rgba(187,134,252,.14);outline:2px solid var(--point-color);outline-offset:2px}
.pedigree-thumb{width:44px;height:44px;border-radius:50%;object-fit:cover;background:var(--bg-input);display:grid;place-items:center;font-size:1.25rem}
.pedigree-node.sex-male{border-color:#38bdf8}.pedigree-node.sex-female{border-color:#f472b6}
.pedigree-node strong,.pedigree-node small{display:block}.pedigree-node small{margin-top:3px;color:var(--text-muted)}
.pedigree-node.is-empty{opacity:.6}.pedigree-parents{display:grid;grid-template-columns:repeat(2,minmax(210px,1fr));gap:12px;margin:8px 0 0 22px}
.pet-detail-card{width:min(92vw,480px);max-height:88vh;overflow:auto;padding:16px}.pet-detail-card .modal-header{padding-bottom:10px;margin-bottom:12px;border-bottom:1px solid rgba(255,255,255,.1)}.pet-detail-card .modal-header h3{font-size:1.05rem}.pet-detail-summary{display:grid;grid-template-columns:96px minmax(0,1fr);gap:14px;align-items:start;margin-bottom:16px}.pet-detail-photo{width:96px;height:96px;border-radius:12px;object-fit:cover;background:var(--bg-input)}
.pet-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.pet-fact{min-width:0;padding:8px 9px;border:1px solid rgba(255,255,255,.09);border-radius:8px;background:rgba(255,255,255,.035)}.pet-fact.is-wide{grid-column:1/-1}.pet-fact span,.pet-fact strong{display:block}.pet-fact span{margin-bottom:3px;color:var(--text-muted);font-size:.7rem}.pet-fact strong{overflow:hidden;text-overflow:ellipsis;color:var(--text-main);font-size:.84rem;font-weight:650;white-space:nowrap}
.pet-record-form{display:grid;gap:10px;padding:14px 0;border-top:1px solid var(--border-color);border-bottom:1px solid var(--border-color)}.pet-record-form label{display:grid;gap:6px;font-size:.8rem;font-weight:600;color:var(--text-muted)}.pet-record-form input,.pet-record-form textarea{font-weight:400}.pet-record-form .btn-submit{min-height:40px;margin-top:2px}.pet-file-input{width:100%;color:var(--text-muted);font-size:.78rem}.pet-file-input::file-selector-button{margin-right:9px;padding:7px 11px;border:1.2px solid #5a6170;border-radius:7px;background:var(--bg-input);color:#d1d5db;font:inherit;font-weight:600;cursor:pointer}.pet-file-input::file-selector-button:hover{border-color:#9ca3af;color:#fff}
.pet-record-list{display:grid;gap:10px;margin-top:14px}.pet-record-item{padding:11px 12px;border:1px solid var(--border-color);border-radius:10px;background:rgba(255,255,255,.035)}.pet-record-item img{width:100%;max-height:220px;object-fit:cover;border-radius:8px;margin-top:9px}.pet-record-head{display:flex;justify-content:space-between;align-items:center;gap:8px;padding-bottom:7px;border-bottom:1px solid rgba(255,255,255,.08)}.pet-record-head time{color:var(--text-main);font-size:.82rem;font-weight:700}.pet-record-delete{min-height:30px;padding:4px 9px}.pet-record-item p{white-space:pre-wrap;margin-top:8px;color:#e5e7eb;font-size:.84rem;line-height:1.55}.pet-record-empty{padding:14px;text-align:center;border:1px dashed var(--border-color);border-radius:9px}
.lineage-stage{position:relative;min-width:100%;margin:0 auto}.lineage-connections{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:visible}.lineage-connections path{fill:none;stroke:#737b8c;stroke-width:1.5}.lineage-generation-label{position:absolute;left:2px;z-index:2;transform:translateY(-24px);padding:3px 7px;border-radius:999px;background:#312e81;color:#e0e7ff;font-size:.68rem;font-weight:800;white-space:nowrap}.lineage-stage .pedigree-node{position:absolute;z-index:1;display:grid;grid-template-columns:34px minmax(0,1fr);gap:7px;align-items:center;width:104px;min-width:104px;height:54px;padding:6px 8px;background:#181c24;border-left-width:3px;border-radius:9px}.lineage-stage .pedigree-thumb{width:34px;height:34px;font-size:1rem}.lineage-stage .pedigree-node strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.78rem}.lineage-stage .pedigree-node:hover,.lineage-stage .pedigree-node:focus-visible{transform:none}
@media(max-width:640px){.pet-fields,.pet-pedigree-toolbar,.pedigree-parents{grid-template-columns:1fr}.pedigree-parents{margin-left:10px}.pet-field-wide{grid-column:auto}.pet-detail-summary{grid-template-columns:82px minmax(0,1fr);gap:11px}.pet-detail-photo{width:82px;height:82px}.pet-facts{gap:6px}.pet-fact{padding:7px 8px}}

/* Program login shares the existing application stylesheet. */
.login-shell{min-height:100vh;display:grid;place-items:center;padding:24px;box-sizing:border-box}
.login-card{width:100%;max-width:420px;box-sizing:border-box}
.login-card h1{font-size:2rem;margin:0 0 24px}
.login-card h1 span{color:#4f46e5}
.login-card form,.login-card label,#accountForm>label{display:grid;gap:8px}
.login-card form{gap:18px;margin-top:24px}
.login-card input,#accountForm input{min-height:44px;box-sizing:border-box;width:100%;padding:10px;border:1px solid #d8dee8;border-radius:10px}
.login-card .remember-username{display:flex!important;align-items:center;gap:8px;width:max-content;color:var(--text-muted);font-size:.84rem;font-weight:500;cursor:pointer}.login-card .remember-username input{width:18px;height:18px;min-height:18px;margin:0;padding:0;accent-color:var(--point-color)}
.login-card [hidden]{display:none!important}

.tab-btn[hidden],.admin-only[hidden],#memberForm[hidden],#migrationNotice[hidden]{display:none!important}
.admin-audit{overflow-wrap:anywhere;max-height:380px;overflow:auto;font-size:.85rem}
#memberForm label{display:grid;gap:6px;margin-bottom:12px}
.required-mark{color:#f0a2ad;font-size:.78rem;font-weight:700}
#memberFormStatus:not(:empty),#adminStatus:not(:empty){margin:12px 0;padding:10px 12px;border:1px solid #59657a;border-radius:9px;background:#202733;color:#eef3ff;font-weight:650}

.btn-delete-video { color:#fda4af; border-color:#be6475; }
.btn-delete-video:hover { color:#fff; border-color:#fb7185; background-color:rgba(244,63,94,.15); }
.btn-delete-video:disabled { opacity:.5; cursor:wait; }
