:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #6c757d;
  --card: #f8f9fa;
  --link: #0d6efd;
  --beige: #e9dcc0;
}

[data-theme="dark"] {
  --bg: #252525;
  --text: #e5e7eb;
  --muted: #9aa0a6;
  --card: #161a1e;
  --link: #7aa2f7;
  --beige: #b8a980;
}

/* 기본 배경/글자 */
html, body { background: var(--bg); color: var(--text); }

/* 링크/버튼 예시 */
a { color: var(--link); }
.btn-beige { background: var(--beige); border-color: var(--beige); }
.btn-beige:hover { filter: brightness(0.95); }

/* 캘린더/본문 자잘한 것들 */
.mini-calendar th { font-weight: 600; }
.sunday { color: #d9534f; }
.saturday { color: #0d6efd; }
.entry-content p { margin: 0 0 .5rem; }
.entry-arrow.disabled { opacity: .3; pointer-events: none; }

/* 다크에서 알럿 가독성 */
[data-theme="dark"] .alert {
  background: var(--card);
  color: var(--text);
  border-color: #2a2f36;
}

/* ── San­dol Apple SD Gothic Neo 웹폰트 등록 ───────────────── */
@font-face {
  font-family: 'AppleSDGothicNeo';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/AppleSDGothicNeoR.ttf') format('truetype');
}
@font-face {
  font-family: 'AppleSDGothicNeo';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/AppleSDGothicNeoB.ttf') format('truetype');
}
@font-face {
  font-family: 'AppleSDGothicNeo';
  font-style: normal;
  font-weight: 800;
  src: url('../fonts/AppleSDGothicNeoEB.ttf') format('truetype');
}

body {
  /* 모든 순간 AppleSDGothicNeo를 첫 번째로 시도 */
  font-family: 'AppleSDGothicNeo', -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* ── 전체 래퍼 flex 순서 제어 ───────────────────────── */
.detail-wrapper {
  display: flex;
  flex-direction: column; /* 기본: nav-text 먼저, content 뒤 */
}

/* ── 상단 링크 스타일 (detail과 동일) ───────── */
.top-links .link-btn {
  margin: 0 1rem;
  color: var(--sub);
  text-decoration: none;
  font-weight: 500;
}
.top-links .link-btn:hover {
  text-decoration: underline;
}

/* 모든 .nav-text a 를 동일하게 */
.nav-text a {
  color: var(--fg);
  text-decoration: none;
  margin: 0 0.75rem;
  font-weight: 500;
}
.nav-text a:hover,
.nav-text a.active {
  text-decoration: underline;
}

/* ── 화살표 각도 크게 ───────────────────── */
.nav-arrow, .entry-arrow {
  font-size: 0.9rem;
  line-height: 1;
}
.entry-arrow { margin: 0 2rem; }

/* ── edit 페이지 ───────────────────────── */
#editor {
  min-height: 60vh;
  outline: none;
  border: none;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--fg);
  white-space: pre-wrap;
}
.edit-header .edit-date {
  font-size: 0.9rem;
  color: #ccc;
}
.edit-header .edit-now {
  font-size: 0.9rem;
  color: var(--dim);
  margin-top: 0.2rem;
}

/* ── 년/월 네비게이션 ─────────────────────── */
.nav-arrow {
  color: var(--sub);
  text-decoration: none;
  font-weight: bold;
  margin: 0 0.5rem;
}
.nav-label {
  color: var(--sub);
  margin: 0 0.5rem;
}

/* 상단 링크(👤 사용자명) */
.top-links .link-btn {
  color: var(--sub);
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  background-color: #f7f7f2;
  transition: background-color .2s;
}
.top-links .link-btn:hover {
  background-color: #eae8df;
}

/* 마이페이지 하단 버튼들 */
.account-actions .btn {
  min-width: 120px;
}

/* ── 미니 달력 ───────────────────────────── */
.mini-calendar {
  width: 100%;
  max-width: 360px;
  margin: auto;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.mini-calendar th, .mini-calendar td {
  text-align: center;
  padding: 0.3rem;
}
/* 헤더 요일 색상 */
.mini-calendar th.sunday { color: #d32f2f; }
.mini-calendar th.saturday { color: #1976d2; }

/* 날짜 링크 */
.normal-day {
  color: #bbb;
  text-decoration: none;
  display: block;
}
.diary-day {
  font-weight: bold;
  color: #808080;
  text-decoration: none;
  display: block;
}
[data-theme="dark"] .diary-day { color: #ffffff; }

/* ── 두꺼운 점선 구분선 ───────────────────── */
hr.dotted {
  border: none;
  border-top: 2px dashed var(--border);
  width: 60%;
  margin:0.8rem auto;
}

/* ── 본문 & 화살표 정확한 위치 고정 ───────────────────────── */
.entry-nav {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* 위쪽 정렬 */
  margin-top: 0;
  padding-top: 2rem; /* 점선과의 간격을 조정 (점선 바로 아래에 붙도록 이 값을 조정) */
}

.entry-nav .entry-arrow {
  position: absolute;
  top: 0; /* 항상 위에서 고정된 위치 */
  font-size: 1.5rem;
  color: var(--sub);
  text-decoration: none;
}

.entry-nav .entry-arrow:first-child {
  left: -2rem; /* 좌측 화살표의 위치 */
}

.entry-nav .entry-arrow:last-child {
  right: -2rem; /* 우측 화살표의 위치 */
}

.entry-content {
  width: 100%;
  max-width: 600px;
  flex: 1;
  line-height: 1.8;   /* ← 1 이던 걸 1.8 정도로 */
  color: var(--text); /* ← var(--fg) 말고 --text 사용 */
  text-align: left;
  margin: 0 auto;
  padding: 0 1rem;
  word-break: break-word;
}

.entry-content.preline { white-space: pre-wrap; }


/* ---------- Auth pages ---------- */
.auth-wrap{
  min-height: 70vh;
  display: grid;
  place-items: center;
}
.auth-card{
  width: min(90vw, 420px);
  border-radius: 20px;
  background: color-mix(in oklab, var(--card) 85%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  padding: 28px 24px;
  border: 1px solid rgba(0,0,0,.06);
}
[data-theme="dark"] .auth-card{
  border-color: rgba(255,255,255,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.auth-title{
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}
.auth-sub{
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 18px;
}

/* floating labels 느낌 (부트스트랩 없이 간단버전) */
.form-field{
  position: relative;
  margin-bottom: 14px;
}
.form-field input{
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  padding: 16px 14px 14px;
  outline: none;
}
[data-theme="dark"] .form-field input{
  border-color: rgba(255,255,255,.12);
}
.form-field label{
  position: absolute;
  left: 12px;
  top: 12px;
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
  transition: transform .15s ease, font-size .15s ease, top .15s ease, opacity .15s;
  opacity: .85;
}
.form-field input:focus{
  border-color: var(--link);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--link) 25%, transparent);
}
.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label{
  top: 6px;
  font-size: 11px;
  transform: translateY(-8px);
  opacity: .9;
}



/* 버튼 */
.btn-wide{
  width: 100%;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid transparent;
}
.btn-beige{
  background: var(--beige);
  border-color: var(--beige);
}

/* 하단 링크 */
.auth-links{
  text-align: center;
  margin-top: 12px;
  font-size: 14px;
}

/* ---------- Flash toast ---------- */
.alert-floater{
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 720px);
  z-index: 9999;
  display: grid;
  gap: 10px;
}
.flash{
  position: relative;
  padding: 12px 40px 12px 14px;
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  animation: slideIn .25s ease;
}
[data-theme="dark"] .flash{
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.flash[data-cat="success"]{ border-left: 4px solid #16a34a; }
.flash[data-cat="danger"], .flash[data-cat="error"]{ border-left: 4px solid #ef4444; }
.flash[data-cat="warning"]{ border-left: 4px solid #f59e0b; }
.flash[data-cat="info"]{ border-left: 4px solid #0ea5e9; }

.flash .flash-close{
  position: absolute;
  right: 8px; top: 6px;
  background: none; border: 0;
  font-size: 20px; line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.flash .flash-progress{
  position: absolute;
  left: 0; bottom: 0;
  height: 3px;
  width: 100%;
  background: color-mix(in oklab, var(--link) 30%, transparent);
  transform-origin: left center;
  animation: barShrink 2.2s linear forwards;
}
.flash.hide{
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .25s ease, transform .25s ease;
}

@keyframes slideIn{
  from{ opacity: 0; transform: translate(-50%, -8px); }
  to{ opacity: 1; transform: translate(-50%, 0); }
}
@keyframes barShrink{
  from{ width: 100%; }
  to{ width: 0%; }
}

/* ── 반응형: 모바일일 때 ───────────────────────── */
@media (max-width: 576px) {

  /* detail-wrapper를 뒤집어서 nav-text가 하단으로 */
  .detail-wrapper {
    flex-direction: column-reverse;
  }

  /* 홈/일기 쓰기 링크를 좀 더 띄워 주고 */
  .nav-text {
    margin: 1rem 0;
  }
  .nav-text a {
    margin: 0 1rem;
  }

  /* mini-calendar는 기존 스타일 유지 (크기만 조절) */
  .mini-calendar {
    font-size: 0.8rem;
  }
}

/* .user-btn 을 가로 정렬로 바꿔 겹침 방지 + 간격 확보 */
.user-btn{
  position: fixed;
  top: 12px;
  right: 18px;
  z-index: 1030;
  display: flex;                  /* ← 추가 */
  align-items: center;            /* ← 추가 */
  gap: 0px;                      /* ← admin과 random 사이 간격 */
}

/* admin과 동일 톤(볼드X) */
.recall-link{
  text-decoration: none !important;
  color: var(--text);             /* 다크/라이트 자동 대비 */
}
.recall-text{
  display: inline-block;
  font-weight: 400;               /* ← 볼드 해제: admin과 동일 무게 */
  font-size: 1rem;                /* ← admin과 동일 크기 */
  letter-spacing: 0;              /* ← admin과 동일 자간 */
  line-height: 1;
  text-shadow: none;              /* ← 로고 느낌의 그림자 제거 */
  will-change: transform;
}

/* 다른 규칙에서 a:hover 밑줄을 강제해도 얘는 제거 */
.user-btn a.recall-link:hover { text-decoration: none !important; }

/* 다크모드에서 더 밝게 보이도록(원하면 유지/삭제 가능) */
[data-theme="dark"] .recall-link { color: #fff; }


.user-btn a {
  color: var(--fg);
  text-decoration: none;
  font-size: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;

}
.user-btn a:hover {
  text-decoration: underline;
}

/* 래퍼: 스케일/이동만 담당 (배경은 완전 투명) */
.about-link{
  position: relative;
  display: inline-grid; place-items: center;
  width:56px; height:56px;
  border-radius:16px;
  cursor:pointer; outline:0;
  transition: transform .22s cubic-bezier(.2,.8,.2,1);
  isolation:isolate;
}
.about-link:hover,
.about-link:focus-visible{
  transform: translateY(-2px) scale(1.10);
}

/* 이미지: 회전만 담당. 그림자는 drop-shadow (투명 영역 기준) */
.about-link img{
  display:block; width:100%; height:100%;
  border-radius:16px;
  /* 투명 PNG의 알파를 기준으로 그림자 적용 */
  filter:
    drop-shadow(0 2px 4px rgba(0,0,0,.20))
    drop-shadow(0 12px 26px rgba(0,0,0,.28));
  transition: filter .18s ease;
  will-change: transform;
}
.about-link:hover img,
.about-link:focus-visible img{
  filter:
    drop-shadow(0 4px 8px rgba(0,0,0,.22))
    drop-shadow(0 18px 38px rgba(0,0,0,.38));
}

/* 모션 줄이기 선호 시 회전 안 함 */
@media (prefers-reduced-motion: reduce){
  .about-link:hover, .about-link:focus-visible { transform:none; }
}


/* ── 공통: 모바일 네비 숨기기 ───────────────────────── */
.mobile-nav {
  display: none;
}

/* disabled 상태인 화살표 연한 회색으로 */
.entry-nav .entry-arrow.disabled {
  color: var(--dim); /* 연한 회색으로 변경 */
}

.entry-nav .entry-arrow.disabled,
.mobile-nav .entry-arrow.disabled {
  color: var(--dim);   /* 연한 회색(다크에선 어두운 회색) */
  pointer-events:none;
}

.entry-date-left{
  color:#bbb;
  font-weight:normal;
  text-align:left;
  max-width:600px;
  margin:0 auto 1rem;   /* ← 초기버전 그대로 */
}


/* ── 모바일 전용 레이아웃 리오더 ───────────────────────── */
@media (max-width: 576px) {
  .mobile-debug {
    display: block;
  }

  /* 사용자 버튼은 항상 보이도록 override */
  .user-btn {
    display: block !important;
    position: absolute;
    top: 1rem;
    right: 1rem;
  }
  .about-btn { top: 46px; }

  /* 1) 상단 Home/일기쓰기 숨기기 */
  .detail-page .nav-text {
    display: none;
  }
  /* 2) 본문-화살표 컨테이너는 그대로 남기고, 좌우 화살표만 숨기기 */
  .entry-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 본문과 하단 네비 사이에 gap 주기 */
    gap: 1rem;
  }
  /* 모바일에서 entry-nav 의 화살표만 숨김 */
  .entry-nav .entry-arrow {
    display: none;
  }
  /* 2) detail-wrapper 를 flex 컨테이너로 사용 (이미 선언돼 있다면 생략) */
  .detail-wrapper {
    display: flex;
    flex-direction: column;
  }

  /* 3) 각 섹션에 order 지정 */
  /* 달력 + mini-calendar + hr + 날짜( .entry-date-left ) 는 detail-wrapper 내부 첫 번째 자식이므로 order:0~2 로 묶음 */
  .mini-calendar,
  .detail-wrapper > div:nth-of-type(2) .dotted,

  .entry-date-left{
    position:static;
    margin-bottom:.5rem;
    text-align:left;
    left:+3rem;
  }

  /* 본문＋화살표(entry-nav)는 order:1 */
  .entry-nav {
    order: 1;
    /* mobile 에서도 한 줄 유지 */
    flex-wrap: nowrap;
  }

  /* 모바일 네비 보이기 */
  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg);
    border-top: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 0;
  }

  /* 푸터 내비 때문에 본문이 가려지지 않도록 바디에 패딩 추가 */
  body {
    padding-bottom: 4rem;
  }

  .mobile-nav a {
    color: var(--fg);
    text-decoration: none;
    font-size: 1.1rem;
  }
  .mobile-nav a:hover {
    text-decoration: underline;
  }

}

[data-theme="dark"] .daily-preview{ border-color:rgba(255,255,255,.08); }
.daily-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; font-size:14px; }
.daily-head a{ font-size:12px; text-decoration:none; color:var(--link); }
.daily-body{ position:relative; overflow:hidden; transition:max-height .25s ease; }
.daily-body ul{ margin:0; padding-left:1.2rem; }
.daily-body li{ padding:4px 0; }
.daily-body li.done{ opacity:.6; text-decoration:line-through; }
.daily-body.collapsed{ max-height:84px; }
.daily-body:not(.collapsed){ max-height:480px; }
.daily-body .fade-tail{ pointer-events:none; position:absolute; left:0; right:0; bottom:0; height:38px; background:linear-gradient(to bottom, rgba(0,0,0,0), var(--card)); }
.daily-more{ margin-top:6px; }

.lab-links{ top:14px; left:16px; z-index:999; opacity:0; animation:labfade .35s ease .1s forwards; }
.lab-links a{ text-decoration:none; color:var(--muted); font-size:14px; }
.lab-links a:hover{ color:var(--text); }
.lab-links span{ color:var(--muted); margin:0 6px; }
@keyframes labfade{ to{ opacity:1; } }

/* ===== Note editor (Apple Memo 느낌, 선 없음) ===== */
.note-wrap{ width:min(1200px,92vw); margin:20px auto 40px; }
.note-toolbar{ display:flex; align-items:center; gap:8px; margin:0 auto 8px; width:min(1200px,92vw); }
.note-toolbar .muted{ color:var(--muted); font-size:13px; }
.note-toolbar .tool-btn{ border:0; background:transparent; padding:6px 10px; border-radius:10px; }
.note-toolbar .tool-btn:hover{ background:var(--card); }

.note{
  min-height:60vh;
  padding: 0 4px;            /* 선/박스 X */
  background: transparent;
  border: 0;
  outline: none;
  font-size: 1rem;
  line-height: 1.8;
}

/* 체크리스트 라인 */
.note .line{
  display:flex;
  align-items:flex-start;
  gap:8px;
  padding:2px 0;
}
.note .line input.ck{
  margin-top: 5px;           /* 텍스트와 시각 높이 맞추기 */
}
.note .line span{
  flex:1;
  display:inline-block;
  min-width: 4ch;
}
.note .line.done span{
  text-decoration: line-through;
  opacity: .6;
}

/* Daily inline preview(배경과 동일) */
.daily-inline{ width:min(92vw,720px); }
.daily-inline-head{ font-weight:700; font-size:14px; margin-bottom:6px; }
.daily-inline-body{ position:relative; overflow:hidden; max-height:110px; }
.daily-inline-body ul{ margin:0; padding-left:1.2rem; }
.daily-inline-body li{ padding:4px 0; }
.daily-inline-body li.done{ opacity:.6; text-decoration:line-through; }
.daily-fade{
  pointer-events:none; position:absolute; left:0; right:0; bottom:0; height:40px;
  background:linear-gradient(to bottom, rgba(0,0,0,0), var(--bg));
}

/* 달력 형광펜 — 더 짧고 살짝 두껍게 */
.mini-calendar a.marked,
.mini-calendar span.marked{
  position: relative; z-index: 0;
}

.mini-calendar a.marked::before,
.mini-calendar span.marked::before{
  content: "";
  position: absolute;
  top: 56%;                  /* 조금 낮게 */
  left: 50%;                 /* 가운데 기준 */
  width: 62%;                /* 가로 길이(짧게) */
  height: 0.85em;            /* 세로 두께 ↑ */
  transform: translateX(-50%) skewX(-10deg);
  background: var(--mark, #FFF59D);
  border-radius: 10px;
  opacity: .9;
  z-index: -1;
}


.edit-footer{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  z-index: 1000;
}
.edit-footer-inner{
  width: min(92vw, 720px);
  margin: 0 auto;
  padding: 10px 0;
  display: flex;
  gap: 8px;
  justify-content: center;
}
body { padding-bottom: 56px; } /* 푸터에 가리지 않도록 하단 패딩 */


/* ===== 상단 정렬(about/admin 같은 y선) ===== */
.about-btn{
  position: fixed;
  top: 12px;          /* admin 과 같은 높이 */
  left: 18px;
  z-index: 1030;
}
.user-btn{
  position: fixed;    /* 같은 레일에 올림 */
  top: 12px;          /* about 과 같은 높이 */
  right: 18px;
  z-index: 1030;
}

/* 본문이 헤더에 가리지 않도록 패딩 */
body{ padding-top: 64px; }

/* ===== 아이콘 살짝 더 작게 ===== */
.about-link{
  width: 40px;        /* ↓ 56 → 44 */
  height: 40px;
  border-radius: 12px;
  transition: transform .22s cubic-bezier(.2,.8,.2,1);
}
.about-link:hover,
.about-link:focus-visible{
  transform: translateY(-1px) scale(1);
}
/* 이미지는 래퍼에 맞춤(기존 회전/그림자 규칙은 그대로 적용) */
.about-link img{ width: 100%; height: 100%; }

/* 모바일 보정(원하면) */
@media (max-width: 576px){
  .about-link{ width: 40px; height: 40px; }
  .about-btn{ top: 12px; left: 14px; }
  .user-btn{ top: 12px; right: 14px; }
}

/* ===== Ghost Egg (edit 전용) ===== */
.egg-veil {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 2147483647;
  opacity: 0;
}
.egg-veil.on { animation: egg-flicker 1.6s ease forwards; }
.egg-veil img {
  max-width: min(48vw, 360px);
  max-height: 48vh;
  opacity: 0;
  filter: drop-shadow(0 18px 50px rgba(0,0,0,.25)) blur(.2px);
  transform: translateY(6px) scale(.98);
}
.egg-veil.on img { animation: egg-img 1.6s ease forwards; }

@keyframes egg-flicker { 0%{opacity:0} 12%{opacity:.25} 70%{opacity:.25} 100%{opacity:0} }
@keyframes egg-img { 0%{opacity:0;transform:translateY(6px) scale(.98)}
  14%{opacity:.95;transform:translateY(0) scale(1)}
  70%{opacity:.95}
  100%{opacity:0;transform:translateY(-2px) scale(1.01)}
}
@media (prefers-reduced-motion: reduce){
  .egg-veil.on,.egg-veil.on img{ animation-duration:.6s }
}

//* ===== 통계 카드 톤업 ===== */
.stat-simple{
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: auto;
  max-width: min(720px, 92vw);
  margin: 24px 0 28px;
  text-align: center;

  padding: 16px 22px;
  border-radius: 16px;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  box-shadow: 0 8px 24px color-mix(in oklab, #000 10%, transparent);
  backdrop-filter: blur(2px);
}

/* 라벨 칩 */
.stat-simple .k{
  display:inline-flex; align-items:center; gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--muted) 12%, transparent);
  color: color-mix(in oklab, var(--text) 86%, var(--muted));
  letter-spacing:.02em;
  font-weight: 600;
  font-size: 12.5px;
}

/* 값 강조 – 숫자 그라디언트 + 탭울러 넘버 */
.stat-simple .v.big{
  font-weight: 900;
  font-size: 24px;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--link), color-mix(in oklab, var(--link) 60%, #6cf));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: .01em;
}

/* 블록 묶음 */
.stat-simple .kv,
.stat-simple .week{
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* 섹션 간 미세 구분 */
.stat-simple .kv + .kv{ margin-top: 6px; }
.stat-simple .kv + .week{ margin-top: 10px; }

/* ===== 요일 그리드 ===== */
.week-grid{
  display: inline-grid;
  grid-template-columns: repeat(7, max-content);
  gap: 0 14px;
  position: relative;
  padding: 10px 8px 0;
}

/* 하단 기준선 */
.week-grid::before{
  content:"";
  position:absolute; left:0; right:0; bottom:42px;
  height:1px;
  background: color-mix(in oklab, var(--muted) 24%, transparent);
}

/* 칸 */
.dcol{
  display:grid;
  grid-template-rows: 44px auto auto;
  align-items:end;
  justify-items:center;
  padding-inline: 2px;
}

/* 막대: 기본 톤 + 라이트 애니메이션 */
.dcol .bar{
  width:10px; border-radius:6px;
  background: color-mix(in oklab, var(--muted) 50%, transparent);
  opacity:.55;
  transform-origin: bottom center;
  transition: transform .18s ease-out, opacity .18s ease-out, filter .18s ease-out;
}

/* 값 있는 날 */
.dcol .bar.on{
  background: linear-gradient(180deg, var(--link), color-mix(in oklab, var(--link) 70%, #3aa8ff));
  opacity:.95;
  animation: growIn .45s ease-out both;
}

/* 값 없는 날 */
.dcol .bar.off{ height:6px !important; opacity:.35; }

/* 레이블/카운트 */
.dcol .lbl{ font-size:11px; color: color-mix(in oklab, var(--muted) 85%, var(--text)); margin-top:6px; line-height:1;}
.dcol .cnt{ font-weight:800; font-size:12px; line-height:1; color: color-mix(in oklab, var(--text) 90%, var(--muted)); }

/* 호버 상호작용(가볍게) */
.dcol:hover .bar.on{ transform: scaleY(1.06); filter: saturate(1.15); }
.dcol:hover .cnt{ text-decoration: underline; }

/* 호버 시 값 토스트 */
.dcol:hover::after{
  content: attr(data-tip);
  position: absolute;
  translate: 0 -58px;
  padding: 4px 8px;
  font-size: 11px; font-weight:700;
  color: var(--bg);
  background: var(--text);
  border-radius: 6px;
  box-shadow: 0 4px 12px color-mix(in oklab, #000 20%, transparent);
  white-space: nowrap;
}

/* 등장 애니메이션 */
@keyframes growIn{
  from{ transform: scaleY(0.2); opacity:.0; }
  to  { transform: scaleY(1);   opacity:.95; }
}

/* 모션 민감 사용자 배려 */
@media (prefers-reduced-motion: reduce){
  .dcol .bar.on{ animation:none; }
  .dcol .bar, .dcol:hover .bar.on{ transition:none; }
}


/* ---- 고정 레이아웃: 수직 정렬 다시 강제 ---- */
section.stat-simple{
  display: inline-flex !important;   /* 다른 룰이 덮어도 이걸로 확정 */
  flex-direction: column !important;
  align-items: center;
  gap: 18px;
  width: auto;
  max-width: min(720px, 92vw);
  margin: 24px 0 28px;
  text-align: center;
}

/* 자식은 인라인-플렉스지만 '세로 스택' 유지 */
section.stat-simple > .kv,
section.stat-simple > .week{
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* === 라벨 칩 제거(톤 맞춤) === */
.stat-simple .k{
  background: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--muted) !important;
  font-weight: 600;         /* 원하면 500~600 사이로 조절 */
  font-size: 13px;          /* 기존보다 살짝 작게 */
  letter-spacing: .01em;
}

/* 칩이 사라지면서 위아래 간격만 약간 정리 */
.stat-simple .kv,
.stat-simple .week{
  gap: 6px;                 /* 8px → 6px */
}
.stat-simple .kv + .kv{ margin-top: 4px; }
.stat-simple .kv + .week{ margin-top: 8px; }
