/* 기존 스타일 유지 */
:root{
 --bg:#f8f9fa; --card:#fff; --pink:#fff0f3; --main:#ff8fa3; --shadow:rgba(255,112,150,0.3);
 --pink-soft:#fff0f3; --line:#eee; --shadow:0 6px 18px rgba(0,0,0,.06);
 --text:#222; --muted:#666; --focus:#ffe0e7;
 --pallette1: #FFD6DE;/* 밝은 베이비 핑크 (fff0f3보다 확실히 진함) */

--pallette2: #FFB3C1; /* 파스텔 로즈 (main보다 채도 낮음) */

--pallette3: #FF6F91; /* 선명한 핫핑크 느낌 (main보다 더 쨍함) */

--pallette4: #E75480; /* 딥 로즈 (명도 확 내려감) */

--pallette5: #C2185B; /* 진한 라즈베리 핑크 (어두운 영역) */

--pallette6: #9C4A7B; /* 보랏빛 섞인 더스티 핑크 (톤 분리용) */

--pallette7: #FF9E80; /* 살구빛 코랄 핑크 (main과 다른 방향) */
}
*{box-sizing:border-box}
body{ margin:0; padding:20px; background:var(--bg); font-family:sans-serif; color:var(--text); }
.container{max-width:980px; margin:0 auto;}
.topbar{display:flex; justify-content:flex-end; margin:10px 0 14px}
.btn{ background:#ff8fa3; color:#fff; border:none; padding:10px 16px; border-radius:10px; font-weight:800; cursor:pointer; }
.back{ color:#666; text-decoration:none; font-weight:900; cursor:pointer; margin-bottom:10px; display:inline-block;}

/* 토글 및 요약 스타일 */
.toggles{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:10px 0 14px; }
.pill{ display:inline-flex; gap:6px; padding:6px; border-radius:999px; background:#fff; box-shadow:var(--shadow); }
.pill .tab{ border:0; background:transparent; padding:10px 14px; border-radius:999px; font-weight:900; cursor:pointer; color:#555; }
.pill .tab.active{ background:var(--pink-soft); color:#b23a48; }
.refdate{ display:flex; align-items:center; gap:10px; background:#fff; box-shadow:var(--shadow); border-radius:999px; padding:8px 12px; }
.summary{ display:grid; grid-template-columns:1fr 1fr; gap:20px; margin:10px 0 12px; }
.card{ background:var(--card); border-radius:14px; padding:22px; text-align:center; box-shadow:var(--shadow); }
.card b{font-size:28px; color:#d32f2f}

/* 차트 및 테이블 */
.chart-grid{ display:grid; grid-template-columns:1fr 1fr; gap:20px; margin:10px 0 18px; }
.chart-box{ background:#fff; border-radius:14px; padding:10px; height:270px; display:flex; align-items:center; justify-content:center; box-shadow:var(--shadow); }
.table-card{ background:#fff; border-radius:14px; overflow:hidden; box-shadow:var(--shadow); }
table{ width:100%; border-collapse:collapse; }
thead{ background:var(--pink) }
th,td{ padding:12px; border-bottom:1px solid var(--line); text-align:center; font-size:14px; }

/* ⭐ 삭제 버튼 스타일 */
.del-btn{ background:#ffefef; color:#ff4d4d; border:none; padding:4px 8px; border-radius:6px; cursor:pointer; font-weight:bold; font-size:11px; }
.del-btn:hover{ background:#ff4d4d; color:#fff; }

select, input[type="date"]{ padding:6px 10px; border-radius:8px; border:1px solid #eee; background:#fff; }
td[contenteditable="true"]:focus{ outline:2px solid var(--focus); background:#fff7f9; }

@media (max-width:820px){ .summary, .chart-grid{ grid-template-columns:1fr; } }

/* ====== LOCK BOX (추가) ====== */
/* 오버레이(배경) + 가운데 정렬 */
#lockBox {
 position: fixed; inset: 0; z-index: 9999;
 display: none; align-items: center; justify-content: center;
 background: rgba(255, 240, 245, 0.7); /* 연한 핑크 반투명 */
 backdrop-filter: blur(5px); /* 사장님, 뒤를 살짝 흐리게 해서 고급스럽게! */
}

.lock-inner {
 background: white; padding: 40px 30px; border-radius: 30px;
 width: 85%; max-width: 320px; text-align: center;
 box-shadow: 0 20px 50px rgba(255, 182, 193, 0.4);
 border: 3px solid #ffb6c1; /* 핑크색 테두리 */
}

.lock-icon { font-size: 40px; margin-bottom: 10px; }

h2 { color: #ff69b4; font-size: 1.5rem; margin-bottom: 15px; }

p { color: #888; line-height: 1.6; margin-bottom: 25px; font-size: 0.95rem; }


#showInputBtn {
 background-color: #ff69b4; /* 차분한 보라색 톤 */
 color: white;
 padding: 12px 24px;
 border: none;
 border-radius: 8px; /* 둥글둥글한 모서리 */ font-size: 16px; cursor: pointer;
 transition: 0.3s;
 margin-bottom: 12px; /* 숫자(12)를 키울수록 더 많이 벌어져! */
 display: block;  /* 버튼들이 세로로 예쁘게 정렬되게 해줘 */
 width: 100%; /* 누를 때 부드럽게 반응 */
}

/* 2. 비밀 입력창 세트 (처음엔 숨김) */
#secretPad {
 margin-top: 20px;
 background-color: #f9f9f9; /* 연한 회색 바탕 */
 padding: 20px;
 border-radius: 12px;
 box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* 살짝 띄워진 느낌 */
}

/* 3. 입력창 스타일 */
#serialInput {
 width: 80%;
 padding: 10px;
 margin-bottom: 10px;
 border: 2px solid #ddd;
 border-radius: 5px;
 text-align: center; /* 번호는 가운데서부터 적히게 */
 font-family: monospace; /* 번호가 잘 보이게 글꼴 고정 */
}

/* 4. 확인 버튼 스타일 (비밀 패드 안의 버튼) */
#secretPad button {
 width: 100%; /* 입력창 아래를 꽉 채우는 듬직한 크기 */
 background-color: #ff69b4; /* 신뢰감을 주는 산뜻한 초록색 톤 */
 color: white;
 padding: 12px;
 border: none;
 border-radius: 8px;
 font-size: 16px;
 font-weight: bold;
 cursor: pointer;
 transition: background-color 0.2s; /* 부드러운 색상 변화 */
}

/* 마우스를 올렸을 때 살짝 더 진해지는 효과 */
#secretPad button:hover {
 background-color: #ff1493;
}

/* 버튼을 꾹 눌렀을 때 살짝 들어가는 효과 */
#secretPad button:active {
 transform: scale(0.98);
}





.btn-close {
 background: none; border: none; color: #ffb6c1;
 text-decoration: underline; font-size: 0.85rem; cursor: pointer;
}

.donut-center {
 position: absolute;
 top: 50%;
 left: 50%;
 transform: translate(-50%, -50%); /* 정확히 가운데로 이동 */
 text-align: center;
 pointer-events: none; /* 숫자를 클릭해도 차트가 반응하게! */
}

.donut-label {
 font-size: 12px;
 color: #888;
}

.donut-number {
 font-size: 20px;
 font-weight: bold;
 color: #ff8fa3; /* 서연님의 시그니처 핑크! */
}
.guardian-route-side {
 position: absolute;
 top: 0;
 right: 0;
 width: 280px;
 background: #ffffff;
 border: 4px solid var(--odin-gold);
 border-radius: 30px;
 padding: 1.5rem;
 box-shadow: 0 10px 30px rgba(212, 175, 55, 0.15);
 z-index: 50;
 }

 .back { cursor: pointer; color: #999; font-weight: 700; margin-bottom: 1rem; transition: color 0.2s; }
 .back:hover { color: var(--odin-pink); }

 h1 { font-size: 2.5rem; font-weight: 900; letter-spacing: -0.05em; margin-bottom: 2rem; }

 .topbar { display: flex; justify-content: flex-end; gap: 0.75rem; margin-bottom: 2rem; }

 /* [서연의 요청: 강화 버튼 디자인] */
 .btn-enhance {
 background-color: var(--odin-gold);
 color: #000;
 font-weight: 900;
 padding: 0.8rem 1.5rem;
 border-radius: 18px;
 display: flex;
 align-items: center;
 gap: 0.5rem;
 box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
 transition: all 0.2s;
 }
 .btn-enhance:hover { transform: translateY(-2px); brightness: 1.1; }

  .guardian-route-pill {
    position: fixed; top: 20px; right: 20px; width: 280px;
    background: #ffffff; border-radius: 999px; padding: 12px 20px;
    box-shadow: 0 10px 25px rgba(255,112,150,0.15);
    border: 1px solid rgba(255,112,150,0.15);
    display: flex; align-items: center; justify-content: space-between; z-index: 500;
  }
  .guardian-info { text-align: right; flex: 1; margin-right: 12px; }
  .guardian-tag { color: #FF7096; font-size: 11px; font-weight: 900; display: block; }
  .guardian-msg { color: #8892b0; font-size: 11px; font-weight: 700; font-style: italic; }
  .guardian-avatar {
    width: 48px; height: 48px; background: #000; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.1); overflow: hidden;
  }
  .guardian-avatar img { width: 100%; height: 100%; object-fit: cover; }

  /* ===== 강화 버튼 ===== */
  .btn-enhance {
    background-color: #D4AF37; color: black; font-weight: 900;
    padding: 12px 24px; border-radius: 18px; border: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px; font-size: 14px;
    box-shadow: 0 5px 15px rgba(212,175,55,0.25); transition: transform 0.2s;
    margin-right: 10px;
  }
  .btn-enhance:active { transform: scale(0.95); }

  /* ===== 강화 모달 ===== */
  .modal-overlay {
    position: fixed; inset: 0; background: rgba(255,240,243,0.85);
    display: none; align-items: center; justify-content: center;
    z-index: 1000; backdrop-filter: blur(10px);
  }
  .lovely-modal {
    background: #fff; width: 90%; max-width: 480px; border-radius: 60px; padding: 45px;
    position: relative; box-shadow: 0 40px 80px rgba(255,112,150,0.2);
    animation: popIn 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
    border: 8px solid #FFF0F3; text-align: center;
  }
  @keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  .modal-close-x {
    position: absolute; top: 28px; right: 28px; color: #ddd;
    cursor: pointer; transition: color 0.2s; background: none; border: none; z-index: 10;
  }
  .modal-close-x:hover { color: #FF7096; }
  .modal-title { font-size: 26px; font-weight: 900; color: #FF7096; margin-bottom: 24px; }
  .tool-preview-box {
    background: #fff; border: 4px solid #FFF0F3; border-radius: 40px;
    width: 160px; height: 160px; margin: 0 auto 24px;
    display: flex; align-items: center; justify-content: center; font-size: 76px;
    box-shadow: inset 0 5px 15px rgba(255,112,150,0.05); transition: transform 0.3s;
  }
  .tool-preview-box:hover { transform: scale(1.05) rotate(5deg); }
  .stat-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 0; border-bottom: 2px solid #FFF0F3;
  }
  .stat-label { font-size: 16px; font-weight: 900; color: #444; }
  .stat-badge {
    background: #fff; color: #FF7096; border: 3px solid #FFF0F3;
    padding: 7px 16px; border-radius: 14px; font-weight: 900; box-shadow: 0 4px 0 #FFF0F3;
  }
  .tool-footer-info { margin: 16px 0 0; }
  .tool-footer-info h2 { font-size: 20px; font-weight: 900; color: #222; }
  .tool-footer-info p { font-size: 13px; color: #888; margin-top: 4px; }
  .inner-enhance-btn {
    width: 100%; background: #FF7096; color: white; padding: 22px;
    border-radius: 26px; border: none; font-size: 20px; font-weight: 900;
    cursor: pointer; margin-top: 18px; box-shadow: 0 12px 25px rgba(255,112,150,0.3);
    transition: all 0.3s;
  }
  .inner-enhance-btn:hover { transform: translateY(-3px); filter: brightness(1.1); }
  .inner-enhance-btn:active { transform: scale(0.95); }

  /* ===== 토스트 ===== */
  #forge-toast {
    position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
    background: #000; color: white; padding: 10px 25px; border-radius: 20px;
    font-size: 12px; font-weight: 900; opacity: 0; transition: 0.3s; z-index: 100;
    border: 1px solid #D4AF37; white-space: nowrap;
  }
  #forge-toast.show { opacity: 1; }

  /* ===== 잉크 & 커서 궤적 ===== */
  .ink-splatter {
    position: fixed; background: #FF7096; border-radius: 50%;
    pointer-events: none; z-index: 2000; filter: blur(1px);
  }
  .trail-emoji {
    position: fixed; pointer-events: none; font-size: 22px;
    animation: fadeOutUp 0.9s forwards; z-index: 10000;
  }
  @keyframes fadeOutUp {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-45px) scale(1.4); }
  }
   .floating-btn {
    position: fixed; bottom: 2rem; right: 2rem; width: 4rem; height: 4rem;
    border-radius: 9999px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 15px 30px -5px rgba(0,0,0,0.2); transition: all 0.3s; z-index: 90; cursor: pointer; border: none;
  }
  #userFab { background: white; color: #FF7096; border: 2px solid #FFDDE2; }
  #userFab:hover { transform: scale(1.1); }
  #magFab { display: none; bottom: 7rem; background: #ffffff; color: #FF7096; border: 2px solid #FFDDE2; }
  .lock-badge {
    position: absolute; top: 0; right: 0; width: 1.4rem; height: 1.4rem;
    background: #FFDDE2; border: 2px solid #FF7096; border-radius: 9999px;
    display: flex; align-items: center; justify-content: center; z-index: 91;
  }

  /* ===== 돋보기 렌즈 ===== */
  #magLens {
    display: none; position: fixed; width: 200px; height: 200px; border-radius: 50%;
    border: 5px solid #D4AF37; box-shadow: 0 0 20px rgba(0,0,0,0.4);
    pointer-events: none; z-index: 200; background-color: white; background-repeat: no-repeat; overflow: hidden;
  }

  /* ===== 유저 모달 ===== */
  #userModal {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8);
    backdrop-filter: blur(12px); z-index: 100; align-items: flex-end; justify-content: center;
  }
  @media (min-width: 768px) { #userModal { align-items: center; } }
  .user-modal-content {
    width: 100%; max-width: 480px; background: white; color: black;
    border-radius: 50px 50px 0 0; border-top: 8px solid #FFDDE2;
    overflow: hidden; max-height: 85vh; overflow-y: auto;
    box-shadow: 0 -20px 60px rgba(255,112,150,0.15);
  }
  @media (min-width: 768px) { .user-modal-content { border-radius: 60px; border: 8px solid #FFDDE2; } }
  .user-modal-content::-webkit-scrollbar { width: 6px; }
  .user-modal-content::-webkit-scrollbar-thumb { background: #D4AF37; border-radius: 10px; }
  .hidden-view { display: none !important; }
  .acc-btn {
    width: 2.8rem; height: 2.8rem; border-radius: 0.8rem; display: flex;
    align-items: center; justify-content: center; font-weight: 900; font-size: 0.75rem;
    transition: all 0.2s; border: 2px solid rgba(0,0,0,0.1); cursor: pointer;
  }
  .funding-bar-container { width: 100%; height: 12px; background: rgba(0,0,0,0.05); border-radius: 99px; overflow: hidden; }
  .funding-bar-fill { height: 100%; width: 75%; background: linear-gradient(90deg,#FF7096,#D4AF37); border-radius: 99px; transition: width 1s ease-out; }
  .grid-view { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.75rem; margin-top: 1rem; }
  .grid-item { background: rgba(0,0,0,0.03); border: 2px solid transparent; border-radius: 1.25rem; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem; transition: all 0.2s; cursor: pointer; }
  .grid-item:hover { border-color: #D4AF37; }