:root { --toss-blue: #3182f6; --toss-grey: #f9fafb; --text-main: #191f28; --text-sub: #4e5968; --border-color: #e5e8eb; }
body { margin: 0; font-family: 'Noto Sans KR', sans-serif; color: var(--text-main); line-height: 1.6; background: #fff; word-break: keep-all; }
nav { position: fixed; top: 0; width: 100%; height: 64px; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); display: flex; justify-content: center; align-items: center; z-index: 1000; border-bottom: 1px solid #eee; }
.nav-container { width: 100%; max-width: 1100px; display: flex; justify-content: space-between; padding: 0 20px; align-items: center; }
.logo { font-size: 1.2rem; font-weight: 900; color: var(--text-main); text-decoration: none; }
.content-wrapper { max-width: 1100px; margin: 90px auto 40px; padding: 0 20px; box-sizing: border-box; }

.btn-back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-sub); text-decoration: none; font-weight: 700; font-size: 0.9rem; margin-bottom: 20px; transition: color 0.2s; }
.btn-back:hover { color: var(--toss-blue); }
.btn-back svg { width: 18px; height: 18px; }

.hero-section { text-align: center; margin-bottom: 30px; }
.hero-title { font-size: 2.2rem; font-weight: 900; margin-bottom: 12px; }
.hero-desc { font-size: 1.1rem; color: var(--text-sub); }

.builder-container { background: var(--toss-grey); border-radius: 28px; padding: 20px; margin-bottom: 30px; border: 1px solid var(--border-color); }
.locked { opacity: 0.3; pointer-events: none; filter: blur(2px); transition: 0.4s; }

.timeline-panel { background: #fff; padding: 15px; border-radius: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); overflow-x: auto; margin-bottom: 20px; }
.tm-header { display: grid; grid-template-columns: 140px repeat(24, 1fr); gap: 1px; border-bottom: 2px solid var(--toss-grey); padding-bottom: 8px; margin-bottom: 8px; min-width: 1000px; }
#tm-rows-container { display: flex; flex-direction: column; gap: 6px; min-width: 1000px; height: auto; }
.tm-row { display: grid; grid-template-columns: 140px repeat(24, 1fr); gap: 1px; align-items: center; }
.tm-month { text-align: center; font-size: 0.65rem; color: #adb5bd; font-weight: 600; }
.tm-proj-name { font-size: 0.72rem; font-weight: 700; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 5px; }
.tm-bar { height: 10px; border-radius: 5px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }

.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 20px; }
.guide-box { background: #fff; padding: 18px; border-radius: 20px; border: 1px solid var(--border-color); font-size: 0.85rem; }
.recommend-box { background: linear-gradient(135deg, #e8f3ff 0%, #f0f7ff 100%); border: 1px solid #c2dfff; }
.rec-item { display: flex; flex-direction: column; background: #fff; padding: 10px 12px; border-radius: 12px; margin-top: 8px; border: 1px solid #eef2f6; }
.rec-item-top { display: flex; justify-content: space-between; align-items: center; }
.rec-item-top span { font-weight: 700; color: var(--text-main); font-size: 0.75rem; }
.rec-meta { display: block; font-size: 0.65rem; color: var(--toss-blue); margin-top: 2px; }
.btn-rec-add { background: var(--toss-blue); color: white; border: none; padding: 5px 12px; border-radius: 8px; font-size: 0.7rem; font-weight: 800; cursor: pointer; }

#rec-list::-webkit-scrollbar { width: 6px; }
#rec-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

#reason-panel { margin-top: 15px; padding: 15px 20px; background: #fff1f0; border: 1px solid #ffa39e; border-radius: 18px; font-size: 0.85rem; color: #cf1322; display: none; margin-bottom: 20px; }

.input-panel { background: #fff; padding: 20px; border-radius: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; flex-wrap: wrap; gap: 10px; min-height: 40px; }
.tab-header { display: flex; gap: 5px; background: #eee; padding: 3px; border-radius: 8px; width: 320px; }
.tab-btn { flex: 1; border: none; padding: 6px; border-radius: 6px; cursor: pointer; font-weight: 700; font-size: 0.75rem; background: transparent; color: #8b95a1; }
.tab-btn.active { background: #fff; color: var(--toss-blue); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

.btn-confirm-small { background: var(--toss-blue); color: white; border: none; border-radius: 8px; padding: 8px 20px; font-weight: 800; font-size: 0.85rem; cursor: pointer; transition: 0.3s; }
#email-submit-area { display: none; align-items: center; gap: 8px; flex-wrap: wrap; }

.tab-content { display: none; }
.tab-content.active { display: block; }

.input-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px 12px; }
.full-width { grid-column: 1 / -1; }

.input-row-full { grid-column: 1 / -1; border-top: 1px dashed #eee; margin-top: 15px; padding-top: 15px; }
.input-item label { display: block; font-size: 0.68rem; font-weight: 700; margin-bottom: 4px; color: var(--text-sub); }
.input-item input, .input-item select { width: 100%; padding: 7px 8px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 0.8rem; box-sizing: border-box; }

.toggle-container { display: flex; gap: 8px; margin-bottom: 5px; }
.toggle-btn { flex: 1; background: #f2f4f6; border: none; padding: 6px; border-radius: 8px; font-size: 0.7rem; font-weight: 700; cursor: pointer; color: #8b95a1; transition: 0.2s; }
.toggle-btn.active { background: #e8f3ff; color: var(--toss-blue); outline: 1px solid var(--toss-blue); }

.add-proj-box { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; border-bottom: 1px solid #f2f4f6; padding-bottom: 15px; }
.custom-select { padding: 6px 10px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 0.85rem; min-width: 150px; }
.btn-add { background: var(--toss-blue); color: white; border: none; border-radius: 8px; padding: 7px 16px; font-weight: 700; cursor: pointer; font-size: 0.8rem; }

@media (max-width: 768px) {
    .hero-title { font-size: 1.6rem; }
    .hero-desc { font-size: 0.95rem; }
    .guide-grid { grid-template-columns: 1fr; }
    .input-grid { grid-template-columns: 1fr; gap: 10px; }
    #invest-inputs { grid-template-columns: 1fr; }
    .header-flex { flex-direction: column; align-items: stretch; gap: 12px; }
    .tab-header { width: 100%; box-sizing: border-box; }
    .btn-confirm-small { width: 100%; padding: 12px; font-size: 1rem; }
    #email-submit-area { flex-direction: column; align-items: stretch; }
    #client-email { width: 100% !important; }
    .add-proj-box { flex-direction: column; align-items: stretch; gap: 8px; }
    .add-proj-box > label { margin-left: 0 !important; margin-bottom: -4px; }
    .custom-select { width: 100%; box-sizing: border-box; }
    .btn-add { width: 100%; padding: 10px; font-size: 0.9rem; margin-top: 5px; }
    #settings-list, #history-settings-list { grid-template-columns: 1fr !important; }
}