* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --red: #3182F6;
  --bg: #FFF9F0;
  --border: #F0E8D8;
  --muted: #8B95A1;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --toss-blue: #3182F6;
  --toss-black: #191F28;
  --toss-gray50: #FFF9F0;
  --toss-gray100: #F0E8D8;
  --toss-gray200: #E0D5C5;
  --toss-gray500: #8B95A1;
  --toss-gray700: #4E5968;
  --toss-gray900: #191F28;
  --toss-white: #FFFFFF;
}
body { font-family: -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; background: #FFF9F0; min-height: 100vh; color: var(--toss-gray900); padding-bottom: 72px; -webkit-font-smoothing: antialiased; }

/* ── 테마 색상 ── */
body.theme-pink { --red:#E91E8C; --bg:#FFF0F6; --border:#F5D0E0; --toss-blue:#E91E8C; --toss-gray50:#FFF0F6; --toss-gray100:#F5D0E0; }
body.theme-pink header { background:linear-gradient(135deg,#E91E8C,#F472B6) !important; }
body.theme-pink .bottom-nav-item.active { color:#E91E8C; }
body.theme-pink .badge { background:rgba(233,30,140,0.08); color:#E91E8C; }
body.theme-pink footer { background:#FFF0F6 !important; }
body.theme-pink { background:#FFF0F6; }

body.theme-red { --red:#DC2626; --bg:#FFF5F5; --border:#FECACA; --toss-blue:#DC2626; --toss-gray50:#FFF5F5; --toss-gray100:#FECACA; }
body.theme-red header { background:linear-gradient(135deg,#DC2626,#F87171) !important; }
body.theme-red .bottom-nav-item.active { color:#DC2626; }
body.theme-red .badge { background:rgba(220,38,38,0.08); color:#DC2626; }
body.theme-red footer { background:#FFF5F5 !important; }
body.theme-red { background:#FFF5F5; }

body.theme-blue { /* 기본값 - 별도 오버라이드 불필요 */ }

body.theme-gold { --red:#A8781A; --bg:#F4F3F0; --border:#E0DCD4; --toss-blue:#A8781A; --toss-gray50:#F4F3F0; --toss-gray100:#E0DCD4; }
body.theme-gold header { background:linear-gradient(135deg,#2C2118 0%,#5C4530 30%,#A8781A 55%,#D4A843 70%,#F0D27A 82%,#D4A843 90%,#5C4530 100%) !important; position:relative; overflow:hidden; }
body.theme-gold .hdr-title { text-shadow:0 0 12px rgba(255,215,100,0.5),0 1px 2px rgba(0,0,0,0.3); letter-spacing:0.5px; }
body.theme-gold .hdr-date { color:rgba(255,235,180,0.9) !important; }
body.theme-gold .hdr-sub { color:rgba(255,225,160,0.75) !important; }
body.theme-gold .hdr-day-badge { background:rgba(255,215,100,0.3) !important; border:1px solid rgba(255,215,100,0.4); }
body.theme-gold .child-chip { border-color:rgba(255,215,100,0.4) !important; background:rgba(255,215,100,0.12) !important; }
body.theme-gold .child-chip.active { background:white !important; box-shadow:0 2px 10px rgba(168,120,26,0.25); }
body.theme-gold .btn-add-child { border-color:rgba(255,215,100,0.45) !important; color:rgba(255,235,180,0.9) !important; }
body.theme-gold .bottom-nav-item.active { color:#A8781A; }
body.theme-gold .bottom-nav { border-top:1px solid #E0DCD4; box-shadow:0 -1px 8px rgba(168,120,26,0.08); }
body.theme-gold .badge { background:rgba(168,120,26,0.08); color:#A8781A; }
body.theme-gold footer { background:transparent !important; }
body.theme-gold { background:#ECEAE5; }
body.theme-gold .menu-profile-avatar { background:linear-gradient(135deg,#A8781A,#D4A843) !important; }
body.theme-gold .login-btn { background:linear-gradient(135deg,#A8781A,#D4A843) !important; }
body.theme-gold .sched { border-color:#E0DCD4; }
body.theme-gold .sc { border-color:#E0DCD4; }
body.theme-gold .ev-card { border-color:#E0DCD4; }
body.theme-gold .menu-grid-item { box-shadow:0 1px 4px rgba(168,120,26,0.06); }
body.theme-gold .menu-section { box-shadow:0 1px 4px rgba(168,120,26,0.06); }
body.theme-gold .btn-logout { background:rgba(255,215,100,0.2) !important; border-color:rgba(255,215,100,0.4) !important; }

/* 퀸바이브 은색 반짝이 배경 오버레이 */
#queen-bg-sparkle { display:none; position:fixed; inset:0; pointer-events:none; z-index:0; overflow:hidden; }
body.theme-gold #queen-bg-sparkle { display:block; }
#queen-bg-sparkle .qs { position:absolute; border-radius:50%; animation:qsBlink var(--d,3s) ease-in-out infinite; }
@keyframes qsBlink {
  0%,100%{ opacity:0; transform:scale(0.3); }
  50%{ opacity:var(--o,0.7); transform:scale(1); }
}
@keyframes qsFloat {
  0%{ transform:translateY(0) rotate(0deg); }
  100%{ transform:translateY(-30px) rotate(180deg); }
}

/* 테마 선택 카드 */
.theme-picker { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; padding:16px 18px; }
.theme-card { display:flex; align-items:center; gap:10px; padding:12px 14px; border-radius:14px; border:2.5px solid var(--toss-gray100); background:white; cursor:pointer; transition:all 0.18s; }
.theme-card:hover { transform:translateY(-1px); box-shadow:0 4px 12px rgba(0,0,0,0.08); }
.theme-card:active { transform:scale(0.97); }
.theme-card.active { border-color:var(--toss-blue); box-shadow:0 0 0 1px var(--toss-blue); }
.theme-card-preview { width:36px; height:36px; border-radius:10px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:28px; line-height:1; }
.theme-card-info { flex:1; min-width:0; }
.theme-card-name { font-size:13px; font-weight:800; color:var(--toss-gray900); }
.theme-card-sub { font-size:10px; color:var(--toss-gray500); margin-top:1px; }
.theme-card-check { width:20px; height:20px; border-radius:50%; border:2px solid var(--toss-gray200); display:flex; align-items:center; justify-content:center; font-size:11px; flex-shrink:0; transition:all 0.15s; }
.theme-card.active .theme-card-check { background:var(--toss-blue); border-color:var(--toss-blue); color:white; }

/* ── 로그인 화면 ── */
#login-screen { display:none; position:fixed; inset:0; background:#FFFFFF; z-index:9999; flex-direction:column; align-items:center; justify-content:safe center; padding:24px; overflow-y:auto; -webkit-overflow-scrolling:touch; }
#login-screen.show { display:flex; }
.login-box { background:white; border-radius:24px; padding:32px 28px; width:100%; max-width:360px; }
.login-logo { text-align:center; margin-bottom:24px; }
.login-logo-icon { font-size:48px; }
.login-logo-title { font-size:22px; font-weight:800; color:var(--toss-gray900); margin-top:8px; letter-spacing:-0.5px; }
.login-logo-sub { font-size:13px; color:var(--toss-gray500); margin-top:4px; }
.login-tabs { display:flex; background:var(--toss-gray50); border-radius:12px; padding:3px; margin-bottom:20px; }
.login-tab { flex:1; padding:8px; text-align:center; font-size:13px; font-weight:700; border-radius:9px; cursor:pointer; color:var(--toss-gray500); transition:all 0.15s; }
.login-tab.active { background:white; color:var(--toss-blue); box-shadow:0 1px 4px rgba(0,0,0,0.08); }
.login-fg { margin-bottom:14px; }
.login-fg label { display:block; font-size:12px; font-weight:700; color:var(--toss-gray700); margin-bottom:5px; }
.login-fg input { width:100%; padding:12px 14px; border:1.5px solid var(--toss-gray100); border-radius:12px; font-size:15px; outline:none; background:var(--toss-gray50); transition:border 0.15s; }
.login-fg input:focus { border-color:var(--toss-blue); background:white; }
.login-btn { width:100%; padding:14px; background:var(--toss-blue); color:white; border:none; border-radius:12px; font-size:15px; font-weight:800; cursor:pointer; margin-top:4px; transition:opacity 0.15s; }
.login-btn:hover { opacity:0.9; }
.login-btn:active { opacity:0.85; }
.login-err { color:#F04452; font-size:12px; font-weight:700; text-align:center; margin-top:8px; min-height:18px; }
.login-switch { text-align:center; font-size:12px; color:var(--toss-gray500); margin-top:14px; }
.login-switch span { color:var(--toss-blue); font-weight:700; cursor:pointer; }

/* 헤더 유저 정보 */
.hdr-user { display:flex; flex-direction:row; align-items:center; gap:6px; flex-shrink:0; }
.hdr-userid { font-size:12px; color:rgba(255,255,255,0.9); font-weight:600; }
.btn-logout { font-size:11px; background:rgba(255,255,255,0.2); border:1px solid rgba(255,255,255,0.35); color:white; border-radius:20px; padding:4px 12px; cursor:pointer; font-weight:600; white-space:nowrap; }
.btn-logout:hover { background:rgba(255,255,255,0.3); }
header { background: linear-gradient(135deg, #3182F6, #5BA3FA); padding: 14px 20px 10px; position: sticky; top: 0; z-index: 100; }
.hdr-title { font-size: 19px; font-weight: 800; color: white; letter-spacing: -0.5px; }
.hdr-date  { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.85); margin-top: 2px; }
.hdr-sub   { font-size: 11px; color: rgba(255,255,255,0.7); margin-top: 2px; }
.hdr-day-badge { display: inline-block; background: rgba(255,255,255,0.25); color: white; border-radius: 6px; padding: 1px 7px; margin-left: 4px; font-size: 12px; font-weight: 700; }

/* ── 아이 탭바 ── */
.child-bar { background: transparent; padding: 6px 0; display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.child-bar::-webkit-scrollbar { display: none; }
.child-chip { flex-shrink: 0; display: flex; align-items: center; gap: 7px; padding: 5px 14px 5px 5px; background: rgba(255,255,255,0.18); border: 2px solid rgba(255,255,255,0.3); border-radius: 40px; cursor: pointer; transition: all 0.18s; color: rgba(255,255,255,0.9); font-size: 13px; font-weight: 600; white-space: nowrap; }
.child-chip:hover { background: rgba(255,255,255,0.28); }
.child-chip.active { background: white; }
.child-chip.active .chip-name { color: var(--toss-gray900); }
.chip-av { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; font-size: 16px; overflow: hidden; flex-shrink: 0; }
.chip-av img { width: 100%; height: 100%; object-fit: cover; }
.chip-color { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; border: 2px solid rgba(255,255,255,0.5); }
.child-chip.active .chip-color { border-color: rgba(0,0,0,0.15); }
.chip-edit { display: none; font-size: 11px; margin-left: 1px; }
.child-chip.active .chip-edit { display: inline; color: var(--toss-gray500); }
.btn-add-child { flex-shrink: 0; display: flex; align-items: center; gap: 5px; padding: 6px 14px; background: transparent; border: 1.5px dashed rgba(255,255,255,0.45); border-radius: 40px; color: rgba(255,255,255,0.8); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.18s; white-space: nowrap; }
.btn-add-child:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.6); color: white; }

/* ── 탭 + 뷰 전환 ── */
.tab-nav { display:none; /* 기존 상단 탭 숨김 - 하단 네비로 대체 */ }
.tab-btn { padding: 8px 10px; font-size: 12px; font-weight: 700; background: none; border: none; cursor: pointer; color: var(--toss-gray500); border-radius: 8px; transition: all 0.15s; white-space: nowrap; flex-shrink: 0; }
.tab-btn.active { background: var(--toss-blue); color: white; }
.tab-btn:hover:not(.active) { color: var(--toss-gray900); background: var(--toss-gray50); }
.view-sep { width: 1px; height: 20px; background: var(--border); margin: 0 6px; flex-shrink: 0; }
.btn-viewall { padding: 6px 12px; border-radius: 20px; border: 1.5px solid var(--toss-gray100); background: white; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--toss-gray700); transition: all 0.15s; margin-left: auto; white-space: nowrap; flex-shrink: 0; }
.btn-viewall:hover { border-color: var(--toss-blue); color: var(--toss-blue); }
.btn-viewall.on { background: var(--toss-gray900); color: white; border-color: var(--toss-gray900); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── 전체 메뉴 ── */
.menu-profile { display:flex; align-items:center; gap:14px; padding:20px; background:white; border-radius:16px; box-shadow:0 2px 8px rgba(0,0,0,0.06); margin-bottom:16px; }
.menu-profile-avatar { width:48px; height:48px; border-radius:50%; background:var(--toss-blue); display:flex; align-items:center; justify-content:center; font-size:22px; color:white; flex-shrink:0; }
.menu-profile-info { flex:1; min-width:0; }
.menu-profile-name { font-size:16px; font-weight:800; color:var(--toss-gray900); }
.menu-profile-sub { font-size:12px; color:var(--toss-gray500); margin-top:2px; }
.menu-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:16px; }
.menu-grid-item { display:flex; flex-direction:column; align-items:center; gap:6px; padding:16px 8px; background:white; border-radius:14px; cursor:pointer; transition:all 0.15s; box-shadow:0 1px 4px rgba(0,0,0,0.04); }
.menu-grid-item:hover { background:var(--toss-gray50); transform:translateY(-1px); box-shadow:0 3px 10px rgba(0,0,0,0.08); }
.menu-grid-item:active { transform:scale(0.97); }
.menu-grid-icon { font-size:26px; }
.menu-grid-label { font-size:12px; font-weight:700; color:var(--toss-gray700); }
.menu-section { background:white; border-radius:14px; overflow:hidden; margin-bottom:12px; box-shadow:0 1px 4px rgba(0,0,0,0.04); }
.menu-section-title { font-size:13px; font-weight:800; color:var(--toss-gray500); padding:14px 18px 6px; }
.menu-row { display:flex; align-items:center; gap:12px; padding:14px 18px; cursor:pointer; transition:background 0.1s; }
.menu-row:hover { background:var(--toss-gray50); }
.menu-row:active { background:#f0f0f0; }
.menu-row-icon { font-size:20px; flex-shrink:0; width:28px; text-align:center; }
.menu-row-text { flex:1; font-size:14px; font-weight:600; color:var(--toss-gray900); }
.menu-row-arrow { font-size:14px; color:var(--toss-gray200); flex-shrink:0; }
.menu-row-danger .menu-row-text { color:#F04452; }
.menu-row + .menu-row { border-top:1px solid var(--toss-gray100); }

/* ── 아이 선택 드롭다운 ── */
.cpick-item { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px; cursor:pointer; transition:background 0.1s; }
.cpick-item:hover { background:var(--toss-gray50); }
.cpick-item:active { background:#f0f0f0; }
.cpick-item.cpick-active { background:var(--toss-blue); color:white; }
.cpick-item .cpick-av { width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:14px; overflow:hidden; flex-shrink:0; }
.cpick-item .cpick-av img { width:100%; height:100%; object-fit:cover; }
.cpick-item .cpick-name { font-size:14px; font-weight:700; flex:1; }
.cpick-item .cpick-edit { font-size:11px; color:var(--toss-gray500); }
.cpick-item.cpick-active .cpick-edit { color:rgba(255,255,255,0.7); }

/* ── 하단 네비게이션 바 (토스 스타일) ── */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: white; border-top: 1px solid var(--toss-gray100); display: flex; align-items: stretch; z-index: 200; padding-bottom: env(safe-area-inset-bottom, 0); height: 64px; }

/* ── 일정 서브탭 ── */
.plan-subtabs { display: flex; gap: 4px; background: var(--toss-gray50); border-radius: 10px; padding: 3px; margin-bottom: 0; }
.plan-subtab { flex: 1; padding: 6px 0; text-align: center; font-size: 13px; font-weight: 600; border-radius: 8px; border: none; cursor: pointer; background: transparent; color: var(--toss-gray500); transition: all 0.15s; }
.plan-subtab.active { background: white; color: var(--toss-blue); box-shadow: 0 1px 3px rgba(0,0,0,0.06); font-weight: 700; }

/* ── 오늘/이번주 탭 ── */
.ev-tab { padding: 4px 10px; font-size: 12px; font-weight: 600; border: none; border-radius: 20px; cursor: pointer; background: transparent; color: var(--toss-gray500); transition: all 0.15s; display: inline-flex; align-items: center; gap: 4px; }
.ev-tab.active { background: var(--toss-blue); color: white; }
.ev-tab.active .ev-count-badge { background: rgba(255,255,255,0.3); color: white; }
.bottom-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; color: var(--toss-gray500); font-size: 10px; font-weight: 600; transition: color 0.15s; padding: 6px 0; -webkit-tap-highlight-color: transparent; }
.bottom-nav-item.active { color: var(--toss-gray900); }
.bottom-nav-item .nav-icon { font-size: 22px; line-height: 1; }
.bottom-nav-item .nav-label { font-size: 10px; letter-spacing: -0.3px; }

/* ── 모달 ── */
.overlay { display: none; position: fixed; inset: 0; background: rgba(25,31,40,0.5); z-index: 900; align-items: center; justify-content: center; }
.overlay.open { display: flex; }
.modal { background: white; border-radius: 20px; padding: 24px; width: 320px; max-width: 94vw; box-shadow: 0 16px 48px rgba(0,0,0,0.16); animation: popIn 0.2s ease; }
@keyframes popIn { from { opacity:0; transform:scale(0.95) translateY(10px); } to { opacity:1; transform:scale(1) translateY(0); } }
.modal-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 17px; font-weight: 800; color: var(--toss-gray900); }
.modal-x { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--toss-gray500); }
.modal-x:hover { color: var(--toss-gray900); }
.av-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 18px; }
.av-circle { width: 80px; height: 80px; border-radius: 50%; background: var(--toss-gray50); border: 2px dashed var(--toss-gray200); display: flex; align-items: center; justify-content: center; font-size: 36px; cursor: pointer; overflow: hidden; transition: border-color 0.2s; position: relative; }
.av-circle:hover { border-color: var(--toss-blue); }
.av-circle:hover::after { content: '📷'; position: absolute; background: rgba(0,0,0,0.3); inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.av-circle img { width: 100%; height: 100%; object-fit: cover; }
.av-hint { font-size: 11px; color: var(--toss-gray500); }
.mfg { margin-bottom: 14px; }
.mfg label { display: block; font-size: 11px; font-weight: 600; color: var(--toss-gray500); margin-bottom: 5px; letter-spacing: 0; text-transform: none; }
.mfg input[type=text] { width: 100%; padding: 10px 12px; border: 1.5px solid var(--toss-gray100); border-radius: 10px; font-size: 14px; outline: none; background: var(--toss-gray50); transition: border-color 0.2s; }
.mfg input:focus { border-color: var(--toss-blue); background: white; }
.modal-btns { display: flex; gap: 8px; margin-top: 4px; }
.btn-cancel { flex: 1; padding: 12px; background: var(--toss-gray50); border: 1.5px solid var(--toss-gray100); border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--toss-gray700); }
.btn-save { flex: 1; padding: 12px; background: var(--toss-blue); color: white; border: none; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; }
.btn-del-child { width: 100%; padding: 10px; background: #FFF5F5; color: #F04452; border: 1.5px solid #FFD4D8; border-radius: 10px; font-size: 12px; font-weight: 600; cursor: pointer; margin-top: 10px; }
.btn-del-child:hover { background: #F04452; color: white; }

/* ── 색상 피커 ── */
.cpick { display: flex; gap: 7px; flex-wrap: wrap; }
.cdot { width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: transform 0.12s; }
.cdot:hover { transform: scale(1.15); }
.cdot.on { border-color: var(--toss-gray900); transform: scale(1.1); }

/* ── 시간 수정 모달 ── */
.tedit-overlay { display: none; position: fixed; inset: 0; background: rgba(25,31,40,0.5); z-index: 950; align-items: center; justify-content: center; }
.tedit-overlay.open { display: flex; }
.tedit-modal { background: white; border-radius: 20px; padding: 24px; width: 300px; max-width: 94vw; box-shadow: 0 16px 48px rgba(0,0,0,0.16); animation: popIn 0.2s ease; }
.tedit-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.tedit-title { font-size: 16px; font-weight: 800; color: var(--toss-gray900); }
.tedit-x { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--toss-gray500); }
.tedit-row { margin-bottom: 12px; }
.tedit-row label { display: block; font-size: 11px; font-weight: 600; color: var(--toss-gray500); margin-bottom: 4px; }
.tedit-row input { width: 100%; padding: 10px 12px; border: 1.5px solid var(--toss-gray100); border-radius: 10px; font-size: 14px; outline: none; background: var(--toss-gray50); }
.tedit-btns { display: flex; gap: 8px; margin-top: 14px; }

/* ── 일정 모달 ── */
.todo-overlay { display: none; position: fixed; inset: 0; background: rgba(25,31,40,0.5); z-index: 900; align-items: center; justify-content: center; }
.todo-overlay.open { display: flex; }
.todo-item { display:flex; align-items:center; gap:8px; padding:7px 4px; border-bottom:1px solid var(--toss-gray100); }
.todo-cb { width:18px; height:18px; cursor:pointer; accent-color:var(--toss-blue); flex-shrink:0; }
.todo-text { flex:1; font-size:13px; cursor:pointer; color: var(--toss-gray900); }
.todo-text.done { text-decoration:line-through; color:var(--toss-gray500); }
.todo-del { background:none; border:none; cursor:pointer; color:var(--toss-gray200); font-size:16px; padding:0 3px; }
.todo-del:hover { color:#F04452; }

/* ── 요약 카드 상단 ── */
.summary-top { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-bottom: 10px; }
.sc { background: white; border-radius: 14px; padding: 16px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; border: 1px solid var(--toss-gray100); }
.si { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.sn { font-size: 24px; font-weight: 800; line-height: 1; color: var(--toss-gray900); }
.sl { font-size: 11px; color: var(--toss-gray500); margin-top: 3px; font-weight: 500; }

/* ── 오늘/이번주 카드 ── */
.summary-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.ev-card { background: white; border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); border: 1px solid var(--toss-gray100); }
.ev-card-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; gap: 8px; flex-wrap: wrap; }
.ev-card-title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--toss-gray900); }
.ev-card-icon { font-size: 16px; }
.ev-count-badge { background: var(--toss-blue); color: white; border-radius: 20px; padding: 1px 8px; font-size: 11px; font-weight: 700; min-width: 20px; text-align: center; }
.ev-card-actions { display: flex; gap: 5px; align-items: center; flex: 1; min-width: 0; max-width: 240px; }
.ev-inline-input { flex: 1; min-width: 0; padding: 6px 10px; border: 1.5px solid var(--toss-gray100); border-radius: 20px; font-size: 12px; outline: none; background: var(--toss-gray50); }
.ev-inline-input:focus { border-color: var(--toss-blue); }
.ev-inline-btn { width: 28px; height: 28px; border-radius: 50%; background: var(--toss-blue); color: white; border: none; font-size: 16px; font-weight: 700; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; line-height: 1; }
.ev-list { display: flex; flex-direction: column; gap: 3px; max-height: 160px; overflow-y: auto; }
.ev-item { display: flex; align-items: center; gap: 7px; padding: 5px 4px; border-radius: 8px; transition: background 0.1s; }
.ev-item:hover { background: var(--toss-gray50); }
.ev-cb { width: 16px; height: 16px; cursor: pointer; accent-color: var(--toss-blue); flex-shrink: 0; }
.ev-text { flex: 1; font-size: 12px; cursor: pointer; font-weight: 600; color: var(--toss-gray900); }
.ev-text.done { text-decoration: line-through; color: var(--toss-gray500); font-weight: 400; }
.ev-del { background: none; border: none; cursor: pointer; color: var(--toss-gray200); font-size: 14px; padding: 0 2px; flex-shrink: 0; }
.ev-del:hover { color: #F04452; }
.ev-kid-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.ev-empty { font-size: 11px; color: var(--toss-gray500); text-align: center; padding: 10px 0; }

/* ── 준비물 탭 ── */
.prep-section { margin-top: 4px; }
.prep-day-row { display: flex; align-items: flex-start; gap: 0; margin-bottom: 0; border-bottom: 1px solid var(--toss-gray100); }
.prep-day-row:last-child { border-bottom: none; }
.prep-day-label { width: 32px; flex-shrink: 0; font-size: 14px; font-weight: 800; color: var(--toss-gray700); padding-top: 12px; text-align: center; }
.prep-day-body { flex: 1; min-width: 0; }
.prep-day-input { width: 100%; border: none; outline: none; font-size: 14px; padding: 11px 10px; background: transparent; color: var(--toss-gray900); font-family: inherit; }
.prep-day-input::placeholder { color: var(--toss-gray200); font-size: 13px; }
.prep-day-input:focus { background: rgba(49,130,246,0.03); }
.prep-day-items { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 10px 10px; }
.prep-day-items:empty { display: none; }
.prep-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: var(--toss-gray50); border: 1px solid var(--toss-gray100); border-radius: 20px; font-size: 12px; font-weight: 600; color: var(--toss-gray700); transition: all 0.15s; }
.prep-chip:hover { background: white; border-color: var(--toss-blue); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.prep-chip-del { cursor: pointer; font-size: 14px; color: var(--toss-gray200); margin-left: 2px; line-height: 1; }
.prep-chip-del:hover { color: #F04452; }
.prep-save-btn { width: 100%; padding: 14px; background: var(--toss-blue); color: white; border: none; border-radius: 12px; font-size: 15px; font-weight: 800; cursor: pointer; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; transition: opacity 0.15s; }
.prep-save-btn:hover { opacity: 0.9; }
.prep-save-btn:active { opacity: 0.85; }
.prep-saved-msg { text-align: center; font-size: 12px; color: var(--toss-blue); font-weight: 700; margin-top: 6px; opacity: 0; transition: opacity 0.3s; }
.prep-saved-msg.show { opacity: 1; }

/* 학원탭 섹션 구분 라벨 */
.acad-section-sep { font-size: 14px; font-weight: 800; color: var(--toss-gray900); padding: 18px 0 10px; display: flex; align-items: center; gap: 6px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.acad-section-sep:first-child { padding-top: 0; }
.acad-section-count { font-size: 12px; font-weight: 700; color: var(--toss-gray500); }
.acad-section-toggle { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--toss-gray500); background: var(--toss-gray50); border: 1px solid var(--toss-gray100); border-radius: 20px; padding: 3px 10px; }
.acad-section-body { overflow: hidden; transition: max-height 0.25s ease; }
.acad-section-body.collapsed { max-height: 0 !important; }

/* 준비물 요약 카드 */
.prep-summary-card { background: white; border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--toss-gray100); overflow: hidden; margin-bottom: 8px; }
.prep-summary-row { display: flex; align-items: flex-start; padding: 10px 16px; border-bottom: 1px solid var(--toss-gray100); gap: 8px; }
.prep-summary-row:last-child { border-bottom: none; }
.prep-summary-day { font-size: 13px; font-weight: 800; color: var(--toss-gray700); width: 22px; flex-shrink: 0; padding-top: 3px; }
.prep-summary-items { font-size: 13px; font-weight: 600; color: var(--toss-gray500); flex: 1; }

/* ── 학원 탭 ── */
.acad-add-section { background: white; border-radius: 14px; box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; border: 1px solid var(--toss-gray100); }
.add-form-tabs { display: flex; gap: 4px; background: var(--toss-gray50); border-radius: 10px; padding: 3px; margin-bottom: 14px; }
.add-form-tab { flex: 1; padding: 7px 0; text-align: center; font-size: 13px; font-weight: 600; border-radius: 8px; border: none; cursor: pointer; background: transparent; color: var(--toss-gray500); transition: all 0.15s; }
.add-form-tab.active { background: white; color: var(--toss-blue); box-shadow: 0 1px 3px rgba(0,0,0,0.06); font-weight: 700; }
.acad-list-section { margin-bottom: 20px; }
.acad-section-title { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 700; margin-bottom: 14px; color: var(--toss-gray900); }
.btn-acad-toggle { font-size: 11px; font-weight: 600; background: var(--toss-gray50); border: 1px solid var(--toss-gray100); border-radius: 20px; padding: 4px 10px; cursor: pointer; color: var(--toss-gray500); }
.acad-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.acad-form-grid .fg { grid-column: auto; }
.acad-form-grid .fg:first-child { grid-column: 1 / -1; }

/* 학원 카드 */
.ac-card { background: white; border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; border: 1px solid var(--toss-gray100); }
.ac-card-hdr { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px 10px; }
.ac-card-color { width: 4px; align-self: stretch; border-radius: 4px; flex-shrink: 0; min-height: 32px; }
.ac-name-wrap { flex: 1; min-width: 0; }
.ac-card-name { font-size: 15px; font-weight: 700; margin-bottom: 5px; color: var(--toss-gray900); }
.ac-card-kid { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; flex-shrink: 0; align-self: flex-start; margin-top: 2px; }
.ac-card-btns { display: flex; gap: 5px; flex-shrink: 0; align-self: flex-start; }
.ac-card-edit { background: var(--toss-gray50); border: none; border-radius: 8px; padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--toss-gray700); }
.ac-card-del { background: rgba(49,130,246,0.06); border: none; border-radius: 8px; padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; color: #F04452; }
.ac-card.ac-expired .ac-card-color, .ac-card.ac-expired .ac-days-chips, .ac-card.ac-expired .ac-info-bar, .ac-card.ac-expired .ac-memo, .ac-card.ac-expired .ac-card-kid { opacity: 0.45; }
.ac-card.ac-expired .ac-card-name { color: var(--toss-gray500); }
.ac-card.ac-expired .ac-card-btns { opacity: 1; }
.ac-days-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.ac-day-chip { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
/* 정보 한줄 바 */
.ac-info-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.ac-info-chip { font-size: 12px; font-weight: 700; color: #555; background: var(--bg); border-radius: 8px; padding: 3px 9px; border: 1.5px solid var(--border); }
/* 메모 */
.ac-memo { font-size: 12px; color: var(--muted); padding: 0 14px 10px; font-style: italic; }
.ac-section-lbl { font-size: 11px; font-weight: 900; padding: 6px 10px 4px; border-radius: 8px; margin-bottom: 8px; display: inline-block; }
.ac-fee-total-row { background: white; border-radius: 12px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow); margin-bottom: 12px; }

@media(max-width:600px){ .acad-form-grid { grid-template-columns: 1fr; } .acad-form-grid .fg:first-child { grid-column: 1; } }
.ev-week-grid { display: flex; flex-direction: column; gap: 4px; max-height: 180px; overflow-y: auto; }
.ev-week-row { display: flex; align-items: flex-start; gap: 8px; padding: 3px 2px; }
.ev-week-day { font-size: 10px; font-weight: 900; width: 22px; flex-shrink: 0; padding-top: 2px; }
.ev-week-day.today { color: var(--red); }
.ev-week-day.sat { color: #3B82F6; }
.ev-week-day.sun { color: #EF4444; }
.ev-week-items { display: flex; flex-wrap: wrap; gap: 3px; flex: 1; min-width: 0; }
.ev-week-chip { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 10px; display: flex; align-items: center; gap: 4px; overflow: hidden; }
.ev-week-chip.done { opacity: 0.5; text-decoration: line-through; }
.ev-week-empty-day { font-size: 10px; color: #ccc; }

/* ── 본문 레이아웃 ── */
.wrap { max-width: 1200px; margin: 0 auto; padding: 20px 16px; }
.layout { display: grid; grid-template-columns: 1fr 220px; gap: 16px; align-items: start; }

/* ── 시간표 ── */
.sched { background: white; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--toss-gray100); }
.sched-top { padding: 10px 12px; border-bottom: 1px solid var(--toss-gray100); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sched-top-row1 { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; width: 100%; }
.sched-top-row1::-webkit-scrollbar { display: none; }
.sched-top-row2 { display: flex; align-items: center; gap: 6px; width: 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-top: 6px; border-top: 1px solid var(--toss-gray100); margin-top: 2px; }
.sched-top-row2::-webkit-scrollbar { display: none; }
/* 알람 설정 */
.alarm-setting { margin-top: 8px; padding: 10px 12px; background: rgba(245,158,11,0.06); border: 1.5px solid rgba(245,158,11,0.2); border-radius: 10px; }
.alarm-setting-title { font-size: 11px; font-weight: 700; color: #D97706; margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.alarm-row { display: flex; align-items: center; gap: 6px; }
.alarm-row select, .alarm-row input { padding: 6px 8px; border: 1.5px solid var(--toss-gray100); border-radius: 8px; font-size: 12px; font-weight: 600; outline: none; background: white; }
.alarm-row select:focus, .alarm-row input:focus { border-color: var(--toss-blue); }
.sched-title { font-size: 13px; font-weight: 800; color: var(--toss-gray900); white-space: nowrap; flex-shrink: 0; }
.badge { background: rgba(49,130,246,0.08); color: var(--toss-blue); border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 600; }
.rng { display: flex; align-items: center; gap: 3px; background: var(--toss-gray50); border: 1px solid var(--toss-gray100); border-radius: 6px; padding: 3px 8px; flex-shrink: 0; }
.rng select { border: none; background: transparent; font-size: 11px; font-weight: 600; outline: none; cursor: pointer; color: var(--toss-gray700); }
.btn-wkend { padding: 4px 8px; background: var(--toss-gray50); border: 1px solid var(--toss-gray100); border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; color: var(--toss-gray700); transition: all 0.15s; white-space: nowrap; flex-shrink: 0; }
.btn-wkend.active { background: rgba(49,130,246,0.08); border-color: var(--toss-blue); color: var(--toss-blue); }
.day-view-group { display:inline-flex; border:1px solid var(--toss-gray100); border-radius:6px; overflow:hidden; flex-shrink:0; }
.day-view-btn { padding:4px 9px; background:var(--toss-gray50); border:none; border-right:1px solid var(--toss-gray100); font-size:11px; font-weight:600; cursor:pointer; color:var(--toss-gray700); transition:all 0.15s; white-space:nowrap; }
.day-view-btn:last-child { border-right:none; }
.day-view-btn.active { background:rgba(49,130,246,0.08); color:var(--toss-blue); }
.grid-wrap { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; width: 100%; }
.tcol { width: 46px; flex-shrink: 0; padding-top: 38px; background: var(--toss-gray50); border-right: 1px solid var(--toss-gray100); position: sticky; left: 0; z-index: 10; transition: padding-top 0.05s; }
.tick { height: 60px; border-top: 1px solid var(--toss-gray100); display: flex; align-items: flex-start; justify-content: center; padding-top: 3px; font-size: 10px; color: var(--toss-gray500); font-weight: 500; }
.days { flex: 1; min-width: 0; overflow: hidden; width: calc(100% - 46px); }
.dhdrs { display: grid; width: 100%; }
.dhdr { height: 38px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; border-left: 1px solid var(--toss-gray100); background: var(--toss-gray50); text-align: center; color: var(--toss-gray700); }
.dhdr[style*="cursor: pointer"]:hover { background: rgba(49,130,246,0.06); }
.day-nav { display:inline-flex; align-items:center; gap:2px; flex-shrink:0; }
.day-nav-btn { width:26px; height:26px; border-radius:6px; border:1px solid var(--toss-gray100); background:var(--toss-gray50); cursor:pointer; font-size:13px; font-weight:700; color:var(--toss-gray700); display:flex; align-items:center; justify-content:center; transition:all 0.15s; }
.day-nav-btn:hover { background:rgba(49,130,246,0.08); color:var(--toss-blue); }

/* 보기 설정 버튼 */
.setting-view-btn { border:1.5px solid var(--toss-gray100); background:white; color:var(--toss-gray700); }
.setting-view-btn.active { border-color:var(--toss-blue); background:rgba(49,130,246,0.06); color:var(--toss-blue); }

/* 빠른 추가 팝업 */
.quick-add-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.35); z-index:500; align-items:center; justify-content:center; }
.quick-add-overlay.open { display:flex; }
.quick-add-box { background:white; border-radius:18px; padding:20px; width:calc(100% - 40px); max-width:340px; box-shadow:0 12px 40px rgba(0,0,0,0.18); }
.quick-add-title { font-size:15px; font-weight:800; color:var(--toss-gray900); margin-bottom:14px; display:flex; align-items:center; gap:6px; }
.quick-add-title .qa-badge { font-size:11px; font-weight:700; background:var(--toss-blue); color:white; border-radius:6px; padding:2px 8px; }
.qa-row { margin-bottom:10px; }
.qa-row label { display:block; font-size:11px; font-weight:700; color:var(--toss-gray500); margin-bottom:4px; }
.qa-row input, .qa-row select { width:100%; padding:10px 12px; border:1.5px solid var(--toss-gray100); border-radius:10px; font-size:14px; outline:none; background:var(--toss-gray50); }
.qa-row input:focus, .qa-row select:focus { border-color:var(--toss-blue); background:white; }
.qa-time-row { display:flex; gap:8px; align-items:center; }
.qa-time-row input { flex:1; }
.qa-time-row span { color:var(--toss-gray500); font-size:13px; font-weight:600; }
.qa-type-btns { display:flex; gap:6px; }
.qa-type-btn { flex:1; padding:8px 4px; border:1.5px solid var(--toss-gray100); border-radius:10px; background:white; font-size:12px; font-weight:700; cursor:pointer; text-align:center; color:var(--toss-gray700); transition:all 0.15s; }
.qa-type-btn.active { border-color:var(--toss-blue); background:rgba(49,130,246,0.06); color:var(--toss-blue); }
.qa-btns { display:flex; gap:8px; margin-top:14px; }
.qa-btns button { flex:1; padding:12px; border-radius:10px; font-size:14px; font-weight:700; cursor:pointer; border:none; }
.qa-btn-cancel { background:var(--toss-gray50); color:var(--toss-gray700); }
.qa-btn-save { background:var(--toss-blue); color:white; }
.dhdr.today { color: var(--toss-blue); background: rgba(49,130,246,0.04); box-shadow: inset 0 0 0 2px var(--toss-blue); border-radius: 4px; font-weight: 700; }
.dhdr.sat { color: #3B82F6; } .dhdr.sun { color: #F04452; }
.cols { display: grid; position: relative; width: 100%; }

/* 준비물 요일별 행 (시간표 내) */
.prep-hdr-row { display: grid; border-top: 1px solid var(--toss-gray100); border-bottom: 1px solid var(--toss-gray100); }
.prep-hdr-row:empty { display: none; }
.prep-hdr-cell { border-left: 1px solid var(--toss-gray100); padding: 5px 3px; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; justify-content: center; min-height: 30px; background: #FFFBEB; text-align: center; }
.prep-hdr-cell.today { background: #FFF7D6; }
.prep-hdr-tag { font-size: 11px; font-weight: 700; color: #92400E; line-height: 1.3; background: #FEF3C7; border: 1px solid #FDE68A; border-radius: 4px; padding: 1px 5px; }
.col { position: relative; border-left: 1px solid var(--toss-gray100); }
.col.today { background: rgba(49,130,246,0.02); }
.hcell { height: 60px; border-top: 1px solid var(--toss-gray100); position: relative; cursor: pointer; }
.hcell::after { content:''; position:absolute; top:50%; left:0; right:0; border-top: 1px dashed rgba(0,0,0,0.04); }
.col.over { background: rgba(49,130,246,0.08); outline: 2px dashed rgba(49,130,246,0.4); }
.blk { position: absolute; left: 1px; right: 1px; border-radius: 8px; padding: 2px 2px; font-size: 12px; font-weight: 600; cursor: grab; user-select: none; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; z-index: 5; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.blk:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.17); z-index: 20; }
.blk.sel { outline: 2.5px solid currentColor; z-index: 15; }
.blk.drag { cursor: grabbing; opacity: 0.8; z-index: 100; }
.blk.readonly { cursor: default; }
.bn { font-size: 12px; line-height: 1.1; white-space: normal; overflow: hidden; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.bt { font-size: 10px; opacity: 0.75; margin-top: 1px; }
.bm { font-size: 10px; opacity: 0.8; font-style: italic; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh { position: absolute; bottom: 0; left: 0; right: 0; height: 12px; cursor: ns-resize; display: flex; align-items: center; justify-content: center; opacity: 0; }
.blk:hover .rh, .blk.sel .rh { opacity: 1; }
.rh::before { content:''; width:20px; height:3px; border-radius:2px; background:rgba(255,255,255,0.85); box-shadow: 0 -4px 0 rgba(255,255,255,0.4); }
.blk-edit-hint { position: absolute; top: 3px; right: 5px; font-size: 10px; opacity: 0; pointer-events: none; }
.blk:hover .blk-edit-hint { opacity: 0.6; }
.blk-sm { padding: 1px 2px; }
.blk-sm .bn { font-size: 9px; -webkit-line-clamp: 1; }
.blk-sm .bm { font-size: 8px; display: none; }
.blk-alarm { position: absolute; top: 1px; left: 2px; font-size: 8px; line-height: 1; opacity: 0.7; pointer-events: none; z-index: 6; }
.dism { position: absolute; left: 0; right: 0; height: 0; border-bottom: 3px solid #F59E0B; z-index: 4; pointer-events: auto; display: flex; align-items: flex-end; justify-content: flex-start; cursor: pointer; user-select: none; }
.dism::before { content: attr(data-label); position: absolute; bottom: 3px; left: 1px; font-size: 9px; font-weight: 700; color: #D97706; background: rgba(255,255,255,0.85); padding: 0 2px; border-radius: 3px; line-height: 1.3; white-space: normal; word-break: keep-all; max-width: calc(100% - 2px); }
.commute-line { position: absolute; left: 0; right: 0; height: 0; border-bottom: 2px dashed #6366F1; z-index: 4; pointer-events: none; }
.commute-line::before { content: attr(data-label); position: absolute; bottom: 2px; left: 4px; font-size: 8px; font-weight: 700; color: #6366F1; background: rgba(255,255,255,0.9); padding: 0 3px; border-radius: 3px; line-height: 1.4; white-space: nowrap; }
.arrival-line { position: absolute; left: 0; right: 0; height: 0; border-bottom: 2.5px solid #22C55E; z-index: 4; pointer-events: none; }
.arrival-line::before { content: attr(data-label); position: absolute; bottom: 3px; left: 1px; font-size: 9px; font-weight: 700; color: #16A34A; background: rgba(255,255,255,0.85); padding: 0 2px; border-radius: 3px; line-height: 1.3; white-space: normal; word-break: keep-all; max-width: calc(100% - 2px); }

/* ── 사이드바 ── */
.sidebar { display: flex; flex-direction: column; gap: 12px; }
.card { background: white; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--toss-gray100); }
.card-hdr { padding: 14px 16px; font-size: 14px; font-weight: 700; border-bottom: 1px solid var(--toss-gray100); color: var(--toss-gray900); }
.card-body { padding: 13px; }
.fg { margin-bottom: 10px; }
.fg label { display: block; font-size: 11px; font-weight: 600; color: var(--toss-gray500); margin-bottom: 4px; letter-spacing: 0; text-transform: none; }
.fg input { width: 100%; padding: 8px 10px; border: 1.5px solid var(--toss-gray100); border-radius: 8px; font-size: 13px; outline: none; background: var(--toss-gray50); }
.fg input:focus { border-color: var(--toss-blue); }
.dcbs { display: grid; grid-template-columns: repeat(5,1fr); gap: 4px; }
.dcbs-7 { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.dcb { display: none; }
.dcb + label { display: block; padding: 6px 2px; text-align: center; border: 1.5px solid var(--toss-gray100); border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; background: var(--toss-gray50); color: var(--toss-gray700); }
.dcb:checked + label { background: var(--toss-blue); color: white; border-color: var(--toss-blue); }
.st-dcb { display: none; }
.st-dcb + label { display: block; padding: 6px 2px; text-align: center; border: 1.5px solid var(--toss-gray100); border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; background: var(--toss-gray50); color: var(--toss-gray700); }
.st-dcb:checked + label { background: var(--toss-blue); color: white; border-color: var(--toss-blue); }
.sch-dcb { display: none; }
.sch-dcb + label { display: block; padding: 6px 2px; text-align: center; border: 1.5px solid var(--toss-gray100); border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; background: var(--toss-gray50); color: var(--toss-gray700); }
.sch-dcb:checked + label { background: var(--toss-blue); color: white; border-color: var(--toss-blue); }
.edit-dcb { display: none; }
.edit-dcb + label { display: block; padding: 6px 2px; text-align: center; border: 1.5px solid var(--toss-gray100); border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; background: var(--toss-gray50); color: var(--toss-gray700); }
.edit-dcb:checked + label { background: var(--toss-blue); color: white; border-color: var(--toss-blue); }

/* 요일별 시간 토글 */
.perday-toggle { display:inline-flex; align-items:center; margin-top:8px; cursor:pointer; }
.perday-toggle input[type=checkbox] { width:16px; height:16px; accent-color:#F04452; cursor:pointer; margin:0 8px 0 0; flex-shrink:0; }
.perday-toggle span { font-size:12px; font-weight:600; color:#F04452; }
.perday-times { margin-top:10px; display:none; }
.perday-times.show { display:block; }
.perday-row { display:flex; align-items:center; gap:8px; margin-bottom:8px; padding:10px 12px; background:var(--toss-gray50); border:1.5px solid var(--toss-gray100); border-radius:10px; }
.perday-row .day-label { font-size:13px; font-weight:700; color:var(--toss-blue); min-width:24px; text-align:center; flex-shrink:0; }
.perday-row input[type=time] { flex:1; padding:6px 8px; border:1.5px solid var(--toss-gray100); border-radius:8px; font-size:12px; outline:none; background:white; min-width:0; }
.perday-row input[type=time]:focus { border-color:var(--toss-blue); }
.perday-row .time-sep { font-size:11px; color:var(--toss-gray500); font-weight:600; flex-shrink:0; }
.perday-transport-row { display:flex; align-items:center; gap:8px; margin-bottom:8px; padding:8px 12px; background:var(--toss-gray50); border:1.5px solid var(--toss-gray100); border-radius:10px; }
.perday-transport-row .day-label { font-size:13px; font-weight:700; color:var(--toss-blue); min-width:24px; text-align:center; flex-shrink:0; }
.perday-transport-row select { flex:1; padding:6px 8px; border:1.5px solid var(--toss-gray100); border-radius:8px; font-size:12px; outline:none; background:white; min-width:0; }
.perday-shuttle-info { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin:6px 0 4px 32px; }
.perday-shuttle-info label { font-size:10px; font-weight:700; color:var(--toss-gray500); }
.perday-shuttle-info input { width:100%; padding:6px 8px; border:1.5px solid var(--toss-gray100); border-radius:8px; font-size:11px; outline:none; background:white; }
/* 아이 색상 프리뷰 박스 */
.kid-color-preview { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.btn-add { width: 100%; padding: 12px; background: var(--toss-blue); color: white; border: none; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; }
.dp { background: white; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; display: none; border: 1px solid var(--toss-gray100); max-width: 100%; box-sizing: border-box; }
.dp.open { display: block; }
.dp-hdr { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--toss-gray100); }
.dp-t { font-size: 16px; font-weight: 700; color: var(--toss-gray900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-x { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--toss-gray500); flex-shrink: 0; }
.dp-body { padding: 13px; overflow: hidden; }
.dp-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--toss-gray100); font-size: 13px; }
.dp-lbl { color: var(--toss-gray500); font-weight: 600; }
.dp-sub { font-size: 10px; font-weight: 600; color: var(--toss-gray500); margin: 8px 0 4px; }
.tr { display: flex; gap: 5px; align-items: center; }
.tr input { flex: 1; padding: 7px 8px; border: 1.5px solid var(--toss-gray100); border-radius: 8px; font-size: 13px; outline: none; background: var(--toss-gray50); min-width: 0; max-width: 100%; box-sizing: border-box; }
.tr input:focus { border-color: var(--toss-blue); }
textarea { width: 100%; min-height: 56px; padding: 8px 10px; border: 1.5px solid var(--toss-gray100); border-radius: 8px; font-size: 13px; background: var(--toss-gray50); resize: vertical; outline: none; line-height: 1.5; }
textarea:focus { border-color: var(--toss-blue); }
select { width:100%; padding:8px 10px; border:1.5px solid var(--toss-gray100); border-radius:8px; font-size:13px; background:var(--toss-gray50); outline:none; color:var(--toss-gray700); -webkit-appearance:none; appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%238B95A1' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 10px center; }
select:focus { border-color:var(--toss-blue); }
.dp-btns { display: flex; gap: 7px; margin-top: 10px; }
.b1 { flex: 1; padding: 10px; background: rgba(49,130,246,0.06); color: var(--toss-blue); border: 1.5px solid rgba(49,130,246,0.2); border-radius: 8px; font-weight: 600; font-size: 12px; cursor: pointer; }
.b1:hover { background: var(--toss-blue); color: white; }
.b2 { flex: 1; padding: 10px; background: #FFF5F5; color: #F04452; border: 1.5px solid #FFD4D8; border-radius: 8px; font-weight: 600; font-size: 12px; cursor: pointer; }
.b2:hover { background: #F04452; color: white; }
.alist { padding: 8px; max-height: 250px; overflow-y: auto; }
.ag { margin-bottom: 6px; }
.ag-hdr { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 8px; font-weight: 600; font-size: 13px; }
.ag-hdr:hover { background: var(--toss-gray50); }
.adot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.ag-sub { padding-left: 16px; }
.ai { display: flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 6px; margin-top: 2px; cursor: pointer; font-size: 12px; color: var(--toss-gray500); }
.ai:hover { background: var(--toss-gray50); }
.ai.on { background: rgba(49,130,246,0.06); color: var(--toss-blue); font-weight: 600; }
.adel { background: none; border: none; cursor: pointer; color: var(--toss-gray200); font-size: 14px; padding: 1px 3px; margin-left: auto; }
.adel:hover { color: #F04452; }
.empty { text-align: center; padding: 18px; color: var(--toss-gray500); font-size: 12px; }
.dgrid { display: flex; flex-direction: column; gap: 0; padding: 0; min-width: 0; }
.di { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-bottom: 1px solid var(--toss-gray100); min-width: 0; }
.di:last-child { border-bottom: none; }
.di-day { font-size: 12px; font-weight: 800; color: var(--toss-gray700); width: 16px; flex-shrink: 0; }
.di-time { padding: 5px 6px; border: 1.5px solid var(--toss-gray100); border-radius: 7px; font-size: 12px; outline: none; background: var(--toss-gray50); width: 110px; flex-shrink: 0; }
.di-time:focus { border-color: var(--toss-blue); }
.di-method { padding: 4px 4px; border: 1.5px solid var(--toss-gray100); border-radius: 7px; font-size: 11px; font-weight: 600; background: var(--toss-gray50); outline: none; flex-shrink: 0; width: 64px; text-align: center; }
.di-method:focus { border-color: var(--toss-blue); }
.di-extra { flex: 1; min-width: 0; }
.di-extra input { padding: 4px 6px; border: 1.5px solid var(--toss-gray100); border-radius: 7px; font-size: 11px; outline: none; background: var(--toss-gray50); width: 100%; }
.di-extra input:focus { border-color: var(--toss-blue); }
.di label { display: none; }
.all-view-notice { padding: 10px 13px; font-size: 11px; color: var(--toss-gray500); font-style: italic; }

/* ── 캘린더 ── */
.cal-wrap { max-width: 1200px; margin: 0 auto; padding: 8px 16px; }
.cal-layout { display: grid; grid-template-columns: 1fr 320px; gap: 10px; align-items: start; }
.cal-card { background: white; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--toss-gray100); }
.cal-hdr { padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--toss-gray100); }
.cal-month { font-size: 18px; font-weight: 800; color: var(--toss-gray900); }
.cal-nav { display: flex; gap: 6px; align-items: center; }
.cal-nav-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--toss-gray100); background: white; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; font-weight: 700; transition: all 0.15s; color: var(--toss-gray700); }
.cal-nav-btn:hover { background: var(--toss-blue); color: white; border-color: var(--toss-blue); }
.cal-today-btn { padding: 5px 12px; border-radius: 20px; border: 1px solid var(--toss-gray100); background: white; cursor: pointer; font-size: 11px; font-weight: 600; color: var(--toss-gray700); transition: all 0.15s; }
.cal-today-btn:hover { background: var(--toss-blue); color: white; border-color: var(--toss-blue); }
.cal-grid { padding: 6px 8px; }
.cal-dowrow { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; margin-bottom: 3px; }
.cal-dow { text-align: center; font-size: 13px; font-weight: 700; color: var(--toss-gray500); padding: 6px 0; }
.cal-dow.sun { color: #F04452; } .cal-dow.sat { color: #3B82F6; }
.cal-days { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.cal-day { border-radius: 8px; padding: 3px 2px; cursor: pointer; transition: background 0.1s; display: flex; flex-direction: column; min-height: 64px; overflow: hidden; }
.cal-day:hover { background: var(--toss-gray50); }
.cal-day.other-month { opacity: 0.28; pointer-events: none; }
.cal-day.selected { background: rgba(49,130,246,0.05); outline: 2px solid var(--toss-blue); }
.cal-dn { font-size: 15px; font-weight: 700; line-height: 28px; width: 28px; text-align: center; flex-shrink: 0; }
.cal-day.today .cal-dn { background: var(--toss-blue); color: white; border-radius: 50%; }
.cal-day.sun .cal-dn { color: #F04452; }
.cal-day.sat .cal-dn { color: #3B82F6; }
.cal-day.today.sun .cal-dn, .cal-day.today.sat .cal-dn { color: white; }
.cal-day.holiday .cal-dn { color: #F04452; }
.cal-holiday-lbl { font-size: 10px; color: #EF4444; font-weight: 700; line-height: 1.3; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
.cal-class-dots { display: flex; gap: 2px; padding: 2px 2px 0; flex-wrap: wrap; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; }
.cal-events { display: flex; flex-direction: column; gap: 1px; margin-top: 2px; flex: 1; }
.cal-ev { font-size: 10px; font-weight: 600; padding: 1px 4px; border-radius: 3px; overflow: hidden; white-space: normal; word-break: break-word; line-height: 1.4; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-ev.done { opacity: 0.55; text-decoration: line-through; }
.cal-ev-more { font-size: 8px; color: var(--muted); font-weight: 700; padding: 0 3px; }

/* ── 날짜 패널 ── */
.day-panel { background: white; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; border: 1px solid var(--toss-gray100); }
.day-panel-hdr { padding: 14px 16px; border-bottom: 1px solid var(--toss-gray100); position: sticky; top: 0; background: white; z-index: 2; }
.day-panel-date { font-size: 15px; font-weight: 700; color: var(--toss-gray900); }
.day-panel-sub { font-size: 11px; color: var(--toss-gray500); margin-top: 2px; }
.day-panel-body { padding: 12px; }
.day-section { margin-bottom: 14px; }
.day-section-title { font-size: 11px; font-weight: 600; color: var(--toss-gray500); margin-bottom: 6px; }
.day-class-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--toss-gray50); border-radius: 10px; margin-bottom: 4px; font-size: 12px; font-weight: 600; }
.day-class-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.day-input-row { display: flex; gap: 6px; margin-bottom: 8px; }
.day-input { flex: 1; padding: 8px 10px; border: 1.5px solid var(--toss-gray100); border-radius: 8px; font-size: 13px; outline: none; background: var(--toss-gray50); }
.day-input:focus { border-color: var(--toss-blue); }
.day-add-btn { padding: 8px 12px; background: var(--toss-blue); color: white; border: none; border-radius: 8px; font-weight: 600; font-size: 12px; cursor: pointer; }
.no-select { text-align: center; padding: 40px 20px; color: var(--toss-gray500); font-size: 13px; }
.kid-section-lbl { font-size: 10px; font-weight: 700; padding: 4px 6px; border-radius: 5px; margin: 8px 0 4px; display: inline-block; }

/* ── 학원 검색 ── */
.btn-ac-search { background:var(--toss-blue); color:white; border:none; border-radius:10px; padding:0 14px; font-size:12px; font-weight:600; cursor:pointer; white-space:nowrap; flex-shrink:0; }
.acsearch-bar { display:flex; gap:8px; margin-bottom:12px; }
.acsearch-input { flex:1; padding:10px 14px; border:1.5px solid var(--toss-gray100); border-radius:12px; font-size:14px; outline:none; background:var(--toss-gray50); }
.acsearch-input:focus { border-color:var(--toss-blue); }
.acsearch-btn { background:var(--toss-blue); color:white; border:none; border-radius:12px; padding:10px 18px; font-size:13px; font-weight:700; cursor:pointer; }
.acsearch-cats { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px; }
.acsearch-cat { padding:5px 12px; border-radius:20px; border:1px solid var(--toss-gray100); background:white; font-size:12px; font-weight:600; cursor:pointer; color:var(--toss-gray700); transition:all 0.15s; }
.acsearch-cat.active { background:var(--toss-blue); color:white; border-color:var(--toss-blue); }
.acsearch-empty { text-align:center; padding:32px; color:var(--toss-gray500); font-size:13px; }
.acsearch-hint { text-align:center; padding:24px 16px; color:var(--toss-gray500); font-size:13px; line-height:1.8; }
.acsearch-item { display:flex; align-items:center; gap:12px; padding:12px; border-radius:12px; cursor:pointer; transition:background 0.12s; border:1.5px solid transparent; margin-bottom:6px; }
.acsearch-item:hover { background:var(--toss-gray50); border-color:rgba(49,130,246,0.15); }
.acsearch-item-icon { width:40px; height:40px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; }
.acsearch-item-info { flex:1; min-width:0; }
.acsearch-item-name { font-size:14px; font-weight:700; margin-bottom:2px; color:var(--toss-gray900); }
.acsearch-item-name mark { background:none; color:var(--toss-blue); font-weight:700; }
.acsearch-item-sub { font-size:12px; color:var(--toss-gray500); }
.acsearch-item-badge { font-size:11px; font-weight:600; padding:2px 8px; border-radius:20px; flex-shrink:0; }
.acsearch-item-select { background:var(--toss-blue); color:white; border:none; border-radius:8px; padding:5px 12px; font-size:12px; font-weight:600; cursor:pointer; flex-shrink:0; }
.acsearch-divider { font-size:11px; font-weight:700; color:var(--toss-gray500); padding:8px 4px 4px; }

/* 약관 동의 */
.terms-box { background:var(--toss-gray50); border:1px solid var(--toss-gray100); border-radius:12px; padding:12px 14px; margin-bottom:12px; }
.terms-all-row { display:flex; align-items:center; gap:10px; cursor:pointer; padding:2px 0 10px; }
.terms-all-label { font-size:13px; font-weight:700; color:var(--toss-gray900); }
.terms-divider { height:1px; background:var(--toss-gray100); margin-bottom:10px; }
.terms-row { display:flex; align-items:center; gap:8px; padding:5px 0; }
.terms-check { width:20px; height:20px; border-radius:6px; border:1.5px solid var(--toss-gray200); background:white; cursor:pointer; flex-shrink:0; display:flex; align-items:center; justify-content:center; transition:all 0.15s; }
.terms-check.checked { background:var(--toss-blue); border-color:var(--toss-blue); }
.terms-check.checked::after { content:'✓'; color:white; font-size:12px; font-weight:800; }
.terms-label { font-size:12px; color:var(--toss-gray700); flex:1; cursor:pointer; }
.terms-required { color:var(--toss-blue); font-weight:700; margin-right:3px; }
.terms-optional { color:var(--toss-gray500); font-weight:600; margin-right:3px; }
.terms-view-btn { font-size:11px; color:var(--toss-gray500); background:none; border:none; cursor:pointer; text-decoration:underline; flex-shrink:0; padding:0; }
/* 약관 본문 */
.terms-content h3 { font-size:13px; font-weight:900; margin:16px 0 6px; color:#333; }
.terms-content h3:first-child { margin-top:0; }
.terms-content p { font-size:12px; line-height:1.8; color:#555; margin-bottom:8px; }
.terms-content ul { padding-left:16px; margin-bottom:8px; }
.terms-content li { font-size:12px; line-height:1.8; color:#555; }
.stats-banner { display:flex; align-items:center; gap:14px; background:var(--toss-blue); border-radius:14px; padding:16px 18px; margin-bottom:16px; color:white; }
.stats-banner-icon { font-size:32px; flex-shrink:0; }
.stats-banner-title { font-size:15px; font-weight:700; margin-bottom:3px; }
.stats-banner-sub { font-size:11px; opacity:0.85; line-height:1.5; }
.stats-summary-row { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:16px; }
.stats-sum-card { background:white; border-radius:14px; padding:14px; box-shadow:var(--shadow); text-align:center; border:1px solid var(--toss-gray100); }
.stats-sum-icon { font-size:22px; margin-bottom:5px; }
.stats-sum-val { font-size:20px; font-weight:800; color:var(--toss-blue); line-height:1; margin-bottom:3px; }
.stats-sum-lbl { font-size:11px; color:var(--toss-gray500); font-weight:500; }
.stats-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.stats-card { background:white; border-radius:14px; box-shadow:var(--shadow); padding:18px; border:1px solid var(--toss-gray100); }
.stats-card-wide { grid-column:1 / -1; }
.stats-card-title { font-size:14px; font-weight:700; margin-bottom:3px; color:var(--toss-gray900); }
.stats-card-sub { font-size:11px; color:var(--toss-gray500); margin-bottom:14px; }
.stats-donut-wrap { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.stats-legend { display:flex; flex-direction:column; gap:6px; flex:1; min-width:100px; }
.stats-legend-item { display:flex; align-items:center; gap:7px; font-size:12px; font-weight:700; }
.stats-legend-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.stats-legend-pct { margin-left:auto; color:var(--muted); font-size:11px; }
.stats-bar-wrap { display:flex; flex-direction:column; gap:8px; }
.stats-bar-row { display:grid; grid-template-columns:52px 1fr 42px; align-items:center; gap:8px; }
.stats-bar-lbl { font-size:12px; font-weight:700; color:#555; text-align:right; }
.stats-bar-bg { background:#F3F4F6; border-radius:20px; height:14px; overflow:hidden; }
.stats-bar-fill { height:100%; border-radius:20px; transition:width 0.6s cubic-bezier(.4,0,.2,1); }
.stats-bar-val { font-size:11px; font-weight:800; color:var(--muted); }
.stats-fee-item { display:flex; align-items:center; justify-content:space-between; padding:9px 0; border-bottom:1px solid var(--border); gap:10px; }
.stats-fee-item:last-child { border-bottom:none; }
.stats-fee-name { font-size:13px; font-weight:800; flex:1; }
.stats-fee-badge { font-size:11px; padding:2px 8px; border-radius:20px; background:var(--bg); font-weight:700; color:#555; flex-shrink:0; }
.stats-fee-amount { font-size:14px; font-weight:900; color:var(--red); flex-shrink:0; }
.stats-fee-empty { text-align:center; padding:20px; color:var(--muted); font-size:13px; }
.stats-coming { text-align:center; padding:28px 20px; border:2px dashed var(--border); box-shadow:none; background:var(--bg); }
.stats-coming-title { font-size:15px; font-weight:900; margin-bottom:8px; }
.stats-coming-sub { font-size:12px; color:var(--muted); line-height:1.7; margin-bottom:14px; }
.stats-coming-chips { display:flex; flex-wrap:wrap; gap:7px; justify-content:center; }
.stats-coming-chips span { background:white; border:1.5px solid var(--toss-gray100); border-radius:20px; padding:4px 12px; font-size:12px; font-weight:700; color:#555; }
@media(max-width:600px){ .stats-summary-row{grid-template-columns:repeat(2,1fr);} .stats-grid{grid-template-columns:1fr;} .stats-card-wide{grid-column:1;} }

.memo-toolbar { display:flex; gap:10px; align-items:center; margin-bottom:12px; }
.memo-search-wrap { flex:1; display:flex; align-items:center; gap:8px; background:var(--toss-gray50); border:1.5px solid var(--toss-gray100); border-radius:12px; padding:8px 12px; }
.memo-search { flex:1; border:none; outline:none; font-size:13px; background:transparent; color:var(--toss-gray900); }
.btn-memo-write { flex-shrink:0; background:var(--toss-blue); color:white; border:none; border-radius:12px; padding:9px 16px; font-size:13px; font-weight:600; cursor:pointer; white-space:nowrap; }
.btn-memo-write:hover { opacity:0.9; }
.memo-cats { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px; }
.memo-cat { padding:5px 14px; border-radius:20px; border:1.5px solid var(--toss-gray100); background:white; font-size:12px; font-weight:700; cursor:pointer; color:#555; transition:all 0.15s; }
.memo-cat.active { background:var(--red); color:white; border-color:var(--red); }
.memo-kid-filter { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:10px; }
.memo-kid-chip { padding:4px 12px; border-radius:20px; border:1.5px solid var(--toss-gray100); background:white; font-size:12px; font-weight:700; cursor:pointer; color:#555; transition:all 0.15s; }
.memo-kid-chip.active { color:white; border-color:transparent; }
.memo-card { background:white; border-radius:16px; box-shadow:var(--shadow); margin-bottom:10px; padding:14px 16px; cursor:pointer; transition:all 0.15s; border-left:4px solid var(--border); }
.memo-card:hover { box-shadow:0 6px 24px rgba(0,0,0,0.13); transform:translateY(-1px); }
.memo-card-top { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.memo-cat-badge { font-size:11px; font-weight:800; padding:2px 9px; border-radius:20px; }
.memo-cat-학원 { background:#EFF6FF; color:#2563EB; }
.memo-cat-일상 { background:#F0FDF4; color:#16A34A; }
.memo-cat-할일 { background:#FFF7ED; color:#EA580C; }
.memo-cat-기타 { background:#F5F3FF; color:#7C3AED; }
/* 독서관리 */
.book-stats-row { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:16px; }
.book-stat { background:white; border-radius:14px; padding:14px; text-align:center; box-shadow:var(--shadow); border:1px solid var(--toss-gray100); }
.book-stat-num { font-size:28px; font-weight:800; color:var(--toss-blue); }
.book-stat-lbl { font-size:11px; color:var(--toss-gray500); font-weight:500; margin-top:2px; }
.book-goal-bar { height:6px; background:var(--toss-gray100); border-radius:3px; margin-top:8px; overflow:hidden; }
.book-goal-fill { height:100%; border-radius:3px; background:var(--toss-blue); transition:width 0.5s; }
.book-goal-fill.done { background:#22C55E; }
.book-goal-txt { font-size:10px; font-weight:500; color:var(--toss-gray500); margin-top:3px; }
.book-actions { display:flex; gap:8px; margin-bottom:16px; }
.book-actions button { flex:1; padding:12px; border:1px solid var(--toss-gray100); border-radius:12px; background:white; font-size:13px; font-weight:600; cursor:pointer; color:var(--toss-gray700); }
.book-actions button:active { background:var(--toss-gray50); }
.book-card { background:white; border-radius:14px; box-shadow:var(--shadow); padding:12px; margin-bottom:10px; display:flex; gap:12px; align-items:flex-start; border:1px solid var(--toss-gray100); }
.book-cover { width:60px; height:85px; border-radius:8px; object-fit:cover; background:var(--toss-gray50); flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:28px; overflow:hidden; }
.book-cover img { width:100%; height:100%; object-fit:cover; }
.book-info { flex:1; min-width:0; }
.book-title { font-size:14px; font-weight:700; color:var(--toss-gray900); margin-bottom:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.book-author { font-size:11px; color:var(--toss-gray500); margin-bottom:4px; }
.book-meta { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.book-date { font-size:11px; color:var(--toss-gray500); font-weight:500; }
.book-kid { font-size:10px; font-weight:600; padding:2px 8px; border-radius:10px; }
.book-del { font-size:11px; color:var(--toss-gray200); cursor:pointer; margin-left:auto; }
.book-del:hover { color:#F04452; }
.book-month-hdr { font-size:13px; font-weight:700; color:var(--toss-gray700); padding:8px 4px 4px; display:flex; align-items:center; gap:6px; }
.book-month-cnt { font-size:11px; font-weight:600; color:var(--toss-blue); background:rgba(49,130,246,0.08); padding:1px 8px; border-radius:10px; }
.book-empty { text-align:center; padding:40px 20px; color:var(--muted); font-size:14px; }
.book-pg { min-width:32px; height:32px; border:1.5px solid var(--toss-gray100); border-radius:8px; background:white; font-size:12px; font-weight:700; color:var(--muted); cursor:pointer; display:flex; align-items:center; justify-content:center; }
.book-pg.active { background:var(--red); color:white; border-color:var(--red); }
.book-pg:disabled { opacity:0.4; cursor:default; }
.book-chart-wrap { background:white; border-radius:14px; box-shadow:var(--shadow); padding:16px; margin-bottom:16px; }
.book-chart-title { font-size:14px; font-weight:800; color:#333; margin-bottom:10px; }
.book-bar-row { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.book-bar-lbl { font-size:11px; font-weight:700; color:var(--muted); width:30px; text-align:right; }
.book-bar { height:20px; border-radius:6px; background:var(--red); opacity:0.75; min-width:2px; transition:width 0.3s; }
.book-bar-num { font-size:11px; font-weight:800; color:#555; }
#book-scanner { width:100%; max-width:400px; margin:0 auto; }
.book-rec-card { flex-shrink:0; width:110px; background:white; border-radius:12px; box-shadow:var(--shadow); padding:8px; text-align:center; cursor:pointer; position:relative; }
.book-rec-card img { width:80px; height:110px; object-fit:cover; border-radius:6px; }
.book-rec-noimg { width:80px; height:110px; background:#f0e8d8; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:32px; margin:0 auto; }
.book-rec-title { font-size:11px; font-weight:800; color:#333; margin-top:6px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.book-rec-author { font-size:9px; color:var(--muted); }
.book-rec-comment { font-size:9px; color:var(--red); font-weight:700; margin-top:2px; }
.book-rec-del { position:absolute; top:2px; right:2px; background:rgba(0,0,0,0.4); color:white; border:none; border-radius:50%; width:18px; height:18px; font-size:10px; cursor:pointer; display:none; line-height:18px; text-align:center; }
.book-rec-card:hover .book-rec-del { display:block; }
@media(max-width:600px){ .book-stats-row{grid-template-columns:repeat(4,1fr);} }
.memo-card-title { font-size:14px; font-weight:900; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.memo-card-preview { font-size:12px; color:#666; line-height:1.5; margin-bottom:8px; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.memo-card-meta { display:flex; align-items:center; gap:10px; font-size:11px; color:var(--muted); font-weight:600; flex-wrap:wrap; }
.memo-card-kid { font-size:11px; font-weight:800; padding:2px 8px; border-radius:20px; color:white; }
.memo-empty { text-align:center; padding:48px 0; color:var(--muted); font-size:14px; }
.memo-detail { padding:20px; }
.memo-detail-top { display:flex; align-items:center; gap:8px; margin-bottom:10px; flex-wrap:wrap; }
.memo-detail-title { font-size:18px; font-weight:900; margin-bottom:8px; line-height:1.4; }
.memo-detail-meta { display:flex; gap:12px; font-size:12px; color:var(--muted); font-weight:600; margin-bottom:16px; padding-bottom:16px; border-bottom:2px solid var(--border); flex-wrap:wrap; }
.memo-detail-body { font-size:14px; line-height:1.8; color:#333; white-space:pre-wrap; margin-bottom:20px; }
.memo-detail-actions { display:flex; gap:8px; margin-bottom:8px; align-items:center; }
.btn-memo-edit { padding:7px 14px; border-radius:20px; border:1.5px solid var(--toss-gray100); background:white; color:var(--toss-gray700); font-size:12px; font-weight:600; cursor:pointer; }
.btn-memo-del { margin-left:auto; padding:7px 14px; border-radius:20px; border:1.5px solid #FFD4D8; background:#FFF5F5; color:#F04452; font-size:12px; font-weight:600; cursor:pointer; }
.cat-정보공유 { background:#EFF6FF; color:#2563EB; }
.cat-질문 { background:#FFF7ED; color:#EA580C; }
.cat-후기 { background:#F0FDF4; color:#16A34A; }
.cat-자유 { background:#F5F3FF; color:#7C3AED; }

@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
  .summary-top { grid-template-columns: repeat(2,1fr); }
  .summary-cards { grid-template-columns: 1fr; }
  .cal-layout { grid-template-columns: 1fr; }
  header { padding: 12px 16px 8px; }
  .hdr-title { font-size: 18px; }
  .hdr-date { font-size: 12px; }
  .tab-btn { padding: 7px 8px; font-size: 11px; }
  .dp.open { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 500; width: calc(100% - 40px); max-width: 320px; box-shadow: 0 16px 48px rgba(0,0,0,0.2); }
}

/* ── 추천책 상세 패널 ── */
#rec-detail-panel {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 800;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  pointer-events: none;
}
#rec-detail-panel.open {
  transform: translateX(0);
  pointer-events: auto;
}
.rec-detail-header {
  background: var(--toss-blue);
  padding: 48px 16px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.rec-detail-back {
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.4);
  color: white;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.rec-detail-back:hover { background: rgba(255,255,255,0.35); }
.rec-detail-header-title {
  font-size: 16px;
  font-weight: 900;
  color: white;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rec-detail-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 16px 40px;
}
.rec-detail-cover {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.rec-detail-cover img {
  width: 140px;
  height: 195px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.2);
}
.rec-detail-cover-empty {
  width: 140px;
  height: 195px;
  background: rgba(49,130,246,0.06);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.rec-detail-card {
  background: white;
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.rec-detail-title {
  font-size: 20px;
  font-weight: 900;
  color: #2D2D2D;
  line-height: 1.35;
  margin-bottom: 6px;
}
.rec-detail-author {
  font-size: 14px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 10px;
}
.rec-detail-age-badge {
  display: inline-block;
  background: rgba(49,130,246,0.06);
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 14px;
}
.rec-detail-comment-box {
  background: var(--bg);
  border-radius: 12px;
  padding: 14px 16px;
  border-left: 4px solid var(--red);
}
.rec-detail-comment-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}
.rec-detail-comment-text {
  font-size: 14px;
  font-weight: 700;
  color: #444;
  line-height: 1.6;
}
.rec-detail-read-btn {
  width: 100%;
  padding: 14px;
  background: var(--toss-blue);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity 0.15s;
}
.rec-detail-read-btn:hover { opacity: 0.9; }
.rec-detail-read-btn:active { opacity: 0.8; }
