
#ccHistoryPage{
  --cc-main:#9f2f4f;
  --cc-main-strong:#7f2039;
  --cc-main-soft:#fff6f8;
  --cc-main-pale:#fcecef;
  --cc-accent:#b84a67;
  --cc-line:#ecd7de;
  --cc-border:#ead7dd;
  --cc-text:#202823;
  --cc-muted:#6d756f;
  width:100%;
  max-width:100%;
  overflow:hidden;
  background:#fff;
  color:var(--cc-text);
  font-family:'Noto Sans KR',sans-serif;
}
#ccHistoryPage *{box-sizing:border-box;font-family:'Noto Sans KR',sans-serif!important}
#ccHistoryPage button{font:inherit}

#ccHistoryPage .history-wrap{
  width:100%;
  max-width:1180px;
  margin:0 auto;
  padding:18px 18px 76px;
}

/* 기간 카테고리 */
#ccHistoryPage .history-tabs-outer{
  width:100%;
  margin:0 0 34px;
  padding:7px;
  overflow-x:auto;
  overflow-y:hidden;
  border:1px solid var(--cc-border);
  border-radius:16px;
  background:#fffafb;
  box-shadow:0 8px 22px rgba(127,32,57,.05);
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  cursor:grab;
}
#ccHistoryPage .history-tabs-outer::-webkit-scrollbar{display:none}

#ccHistoryPage .history-tabs{
  display:flex;
  min-width:max-content;
  width:100%;
  gap:6px;
}

#ccHistoryPage .history-tab{
  flex:1 0 148px;
  min-width:148px;
  height:42px;
  padding:0 20px;
  border:1px solid transparent;
  border-radius:11px;
  background:transparent;
  color:#635b5e;
  font-size:14px;
  font-weight:800;
  letter-spacing:-.02em;
  white-space:nowrap;
  cursor:pointer;
  transition:.2s ease;
}
#ccHistoryPage .history-tab:hover{
  color:var(--cc-main-strong);
  background:#fff;
  border-color:#ecd7de;
}
#ccHistoryPage .history-tab.active{
  color:#fff;
  background:linear-gradient(135deg,var(--cc-main),var(--cc-main-strong));
  border-color:var(--cc-main);
  box-shadow:0 8px 18px rgba(159,47,79,.22);
}

/* 연도 */
#ccHistoryPage .history-timeline{position:relative;width:100%;padding:0 0 20px}
#ccHistoryPage .year-section{position:relative;margin:0 0 36px}
#ccHistoryPage .year-title{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:16px;
  margin:0 0 22px;
}
#ccHistoryPage .year-title:before,
#ccHistoryPage .year-title:after{
  content:"";
  height:1px;
  background:linear-gradient(90deg,transparent,var(--cc-line));
  flex:1;
}
#ccHistoryPage .year-title:after{
  background:linear-gradient(90deg,var(--cc-line),transparent);
}
#ccHistoryPage .year-title span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:106px;
  height:48px;
  padding:0 18px;
  border:1px solid #e8cbd3;
  border-radius:999px;
  background:#fff;
  color:var(--cc-main-strong);
  font-size:29px;
  line-height:1;
  font-weight:900;
  letter-spacing:-.04em;
  box-shadow:0 6px 16px rgba(127,32,57,.05);
}

/* 타임라인 */
#ccHistoryPage .year-body{position:relative}
#ccHistoryPage .year-body:before{
  content:"";
  position:absolute;
  left:66px;
  top:-22px;
  bottom:-34px;
  width:1px;
  background:var(--cc-line);
}
#ccHistoryPage .year-section:last-child .year-body:before{bottom:0}

#ccHistoryPage .month-group{
  position:relative;
  display:grid;
  grid-template-columns:66px minmax(0,1fr);
  gap:16px;
  align-items:start;
  margin:0 0 18px;
}
#ccHistoryPage .month-group:last-child{margin-bottom:0}

#ccHistoryPage .month-date{
  position:relative;
  z-index:2;
  padding:16px 14px 0 0;
  text-align:right;
  color:var(--cc-main-strong);
}
#ccHistoryPage .month-number{
  display:block;
  font-size:25px;
  line-height:1;
  font-weight:900;
  letter-spacing:-.04em;
}
#ccHistoryPage .month-unit{
  display:block;
  margin-top:6px;
  font-size:11px;
  font-weight:700;
  color:#8b817f;
}
#ccHistoryPage .month-dot{
  position:absolute;
  right:-7px;
  top:25px;
  width:13px;
  height:13px;
  border:3px solid #fff;
  border-radius:50%;
  background:var(--cc-main);
  box-shadow:0 0 0 1px #ddb7c2,0 0 0 6px rgba(159,47,79,.08);
}

#ccHistoryPage .month-card{
  min-width:0;
  padding:13px 24px 12px;
  border:1px solid var(--cc-border);
  border-radius:17px;
  background:#fff;
  box-shadow:0 6px 16px rgba(72,38,47,.025);
  transition:.2s ease;
}
#ccHistoryPage .month-card:hover{
  transform:translateY(-1px);
  border-color:#dcb4c0;
  box-shadow:0 11px 24px rgba(127,32,57,.06);
}

#ccHistoryPage .history-entry{
  display:grid;
  grid-template-columns:50px minmax(0,1fr);
  gap:12px;
  align-items:start;
  padding:6px 0;
}
#ccHistoryPage .entry-date{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:29px;
  padding:4px 7px;
  border:1px solid #e8cbd3;
  border-radius:999px;
  background:var(--cc-main-soft);
  color:var(--cc-main);
  font-size:11px;
  line-height:1;
  font-weight:900;
  white-space:nowrap;
}
#ccHistoryPage .entry-content{min-width:0;padding-top:1px}
#ccHistoryPage .history-entry h3{
  margin:0;
  color:#252b27;
  font-size:16px;
  line-height:1.52;
  font-weight:800;
  letter-spacing:-.035em;
  word-break:keep-all;
  overflow-wrap:anywhere;
}
#ccHistoryPage .history-entry p{
  margin:3px 0 0;
  color:var(--cc-muted);
  font-size:13px;
  line-height:1.55;
  font-weight:500;
  word-break:keep-all;
  overflow-wrap:anywhere;
}
#ccHistoryPage .history-empty{
  margin:26px 0;
  padding:46px 20px;
  border:1px solid var(--cc-border);
  border-radius:16px;
  background:#fff;
  color:#777;
  text-align:center;
  font-size:15px;
  font-weight:700;
}

@media(max-width:768px){
  #ccHistoryPage .history-wrap{padding:10px 12px 52px}
  #ccHistoryPage .history-tabs-outer{margin-bottom:26px;border-radius:13px;padding:6px}
  #ccHistoryPage .history-tab{flex:0 0 auto;min-width:108px;height:40px;padding:0 16px;font-size:12.5px;border-radius:10px}
  #ccHistoryPage .year-title{gap:10px;margin-bottom:18px}
  #ccHistoryPage .year-title span{min-width:88px;height:43px;font-size:24px}
  #ccHistoryPage .year-body:before{left:45px}
  #ccHistoryPage .month-group{grid-template-columns:45px minmax(0,1fr);gap:11px;margin-bottom:14px}
  #ccHistoryPage .month-date{padding:13px 10px 0 0}
  #ccHistoryPage .month-number{font-size:20px}
  #ccHistoryPage .month-unit{font-size:10px;margin-top:5px}
  #ccHistoryPage .month-dot{right:-7px;top:21px;width:12px;height:12px}
  #ccHistoryPage .month-card{padding:10px 13px;border-radius:14px}
  #ccHistoryPage .history-entry{grid-template-columns:44px minmax(0,1fr);gap:9px;padding:6px 0}
  #ccHistoryPage .entry-date{min-height:26px;padding:4px 5px;font-size:10.5px}
  #ccHistoryPage .history-entry h3{font-size:14px;line-height:1.5}
  #ccHistoryPage .history-entry p{font-size:12px;line-height:1.5}
}

#ccHistoryPage .history-period[hidden]{display:none!important}
#ccHistoryPage .history-entry h3{font-size:18px;font-weight:700;line-height:1.8;letter-spacing:-.025em}
#ccHistoryPage .history-entry p{font-size:15px;font-weight:400;line-height:1.85;color:#5d625f}
#ccHistoryPage .history-entry{padding:10px 0}
#ccHistoryPage .entry-date{font-size:12px;min-height:32px;line-height:1.4}
#ccHistoryPage .history-tab{font-size:15px;font-weight:700}
#ccHistoryPage .year-title span{font-size:30px;font-weight:800}
#ccHistoryPage .history-admin-bar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px;padding:18px 20px;border:1px solid var(--cc-border);border-radius:14px;background:var(--cc-main-soft)}
#ccHistoryPage .history-admin-bar p{margin:0;font-size:17px;font-weight:700;color:var(--cc-main-strong)}
#ccHistoryPage .history-admin-bar p span{display:block;margin-top:5px;font-size:14px;font-weight:400;color:#625b5f;line-height:1.7}
#ccHistoryPage .history-primary{padding:11px 18px;border:1px solid var(--cc-main);border-radius:10px;color:#fff;background:var(--cc-main);font-size:15px;font-weight:700;white-space:nowrap;cursor:pointer}
#ccHistoryPage .history-primary:hover{background:var(--cc-main-strong)}
#ccHistoryPage .history-edit-actions{display:flex;gap:8px;margin-top:10px}
#ccHistoryPage .history-edit-actions button{padding:6px 12px;border:1px solid var(--cc-border);border-radius:8px;background:#fff;color:var(--cc-main-strong);font-size:13px;cursor:pointer}
#ccHistoryPage button:focus-visible{outline:3px solid #bf6d83;outline-offset:3px}
#ccHistoryPage .history-dialog{width:min(580px,calc(100vw - 28px));max-height:calc(100dvh - 40px);padding:26px;border:1px solid var(--cc-border);border-radius:20px;color:var(--cc-text);background:#fff;overflow:auto;box-shadow:0 20px 70px rgba(40,20,28,.22)}
#ccHistoryPage .history-dialog::backdrop{background:rgba(32,16,22,.45)}
#ccHistoryPage .history-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}
#ccHistoryPage .history-dialog h2{margin:0;font-size:23px;color:var(--cc-main-strong)}
#ccHistoryPage .history-dialog header button{width:36px;height:36px;border:0;background:#fff;font-size:27px;cursor:pointer}
#ccHistoryPage .history-dialog label{display:block;margin:0 0 18px;font-size:15px;font-weight:700;line-height:1.8}
#ccHistoryPage .history-dialog label span{color:var(--cc-main)}
#ccHistoryPage .history-dialog input:not([type=hidden]),#ccHistoryPage .history-dialog textarea{display:block;box-sizing:border-box;width:100%;margin-top:7px;padding:12px;border:1px solid #d9c2ca;border-radius:9px;color:#252b27;background:#fff;font:inherit;font-size:16px;font-weight:400}
#ccHistoryPage .history-dialog textarea{resize:vertical;min-height:120px}
#ccHistoryPage .history-dialog footer{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
#ccHistoryPage .history-dialog footer button:not(.history-primary){padding:11px 18px;border:1px solid var(--cc-border);border-radius:10px;background:#fff;color:#625b5f;cursor:pointer}
#ccHistoryPage #historyEditorMessage{margin:0;color:var(--cc-main-strong);font-size:14px;line-height:1.7}
#ccHistoryPage button:disabled{opacity:.6;cursor:wait}
@media(max-width:768px){
 #ccHistoryPage .history-entry h3{font-size:16px;line-height:1.8}
 #ccHistoryPage .history-entry p{font-size:14px;line-height:1.85}
 #ccHistoryPage .history-tab{font-size:14px}
 #ccHistoryPage .entry-date{font-size:11px;min-height:29px}
 #ccHistoryPage .history-entry{grid-template-columns:45px minmax(0,1fr);gap:10px;padding:9px 0}
 #ccHistoryPage .month-card{padding:10px 14px}
 #ccHistoryPage .history-admin-bar{align-items:flex-start;flex-direction:column;padding:16px}
 #ccHistoryPage .history-dialog{padding:20px}
}

/* Override the layout's generic heading/body sizes within the timeline only. */
#ccHistoryPage .history-entry h3{font-size:18px!important;line-height:1.8!important}
#ccHistoryPage .history-entry p{font-size:15px!important;line-height:1.85!important}
#ccHistoryPage .history-dialog h2{font-size:23px!important}
#ccHistoryPage #historyEditorMessage{font-size:14px!important}
#ccHistoryPage .history-admin-bar p{font-size:17px!important}
@media(max-width:768px){#ccHistoryPage .history-entry h3{font-size:16px!important}#ccHistoryPage .history-entry p{font-size:14px!important}}
