*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --paper:#f9f7f2; --paper2:#f2eee4; --paper3:#e5dfd3;
  --ink:#2c2823; --ink2:#4a443d; --muted:#5c5650;
  --rust:#b56a4c; --rust-l:#d99b82; --rust-d:#8e4e34;
  --white:#ffffff; --sidebar-bg:#2a2723; --sidebar-w:280px;
}
html { scroll-behavior: smooth; }
body { background:var(--paper); color:var(--ink); font-family:'Noto Serif KR',serif; font-weight:300; min-height:100dvh; overflow-x:hidden; }
.layout { display:flex; min-height:100dvh; }
.main { flex:1; margin-left:var(--sidebar-w); min-width:0; }

/* SIDEBAR */
.sidebar-brand-small {
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  margin-top:auto;
  padding-top:10px;
  flex-shrink:0;
  border-top:1px solid rgba(249,247,242,.08);
  color:rgba(249,247,242,.6);
  font-family:'Pretendard',sans-serif;
  font-size:10px;
}
.sidebar-brand-small img {
  width:28px;
  height:28px;
  border-radius:50%;
  object-fit:cover;
  opacity:.92;
}
.owner-name { font-family:'Nanum Pen Script',cursive; font-size:31px; color:var(--rust-l); margin-bottom:4px; }
.owner-tagline { font-family:'Nanum Pen Script',cursive; font-size:17px; color:rgba(249,247,242,.38); line-height:1.7; margin-bottom:20px; }
.sidebar {
  width:var(--sidebar-w);
  position:fixed;
  top:0; left:0;
  height:100dvh;
  background:linear-gradient(180deg,#2a2723,#1f1c19);
  color:var(--paper);
  display:flex;
  flex-direction:column;
  padding:36px 28px 28px;
  z-index:200;
  overflow-y:auto;

  /* ✨ 추가 */
  backdrop-filter:blur(10px);
}
.sidebar-brand { margin-bottom:24px; padding-bottom:20px; border-bottom:1px solid rgba(249,247,242,.07); }
.brand-word {
  font-family:'Playfair Display',serif;
  font-size:38px;
  font-weight:900;
  display:block;
  line-height:1;
  color:var(--paper);
  letter-spacing:-.5px;
}
.brand-sub {
  font-size:9px;
  opacity:.35;
  letter-spacing:.38em;
  display:block;
  margin-top:6px;
  font-family:'Pretendard',sans-serif;
  text-transform:uppercase;
}

/* 네비게이션 */
.s-nav { display:flex; flex-direction:column; gap:2px; margin-bottom:0; }
.s-nav-btn {
  background:none;
  border:none;
  color:rgba(249,247,242,.62);
  text-align:left;
  cursor:pointer;
  font-family:'Pretendard',sans-serif;
  font-size:12.5px;
  font-weight:400;
  letter-spacing:.04em;
  padding:10px 12px 10px 14px;
  border-radius:7px;
  position:relative;
  transition:all .22s ease;
  display:flex;
  align-items:center;
  gap:10px;
}
.s-nav-btn .nav-icon {
  width:15px;
  height:15px;
  flex-shrink:0;
  opacity:.6;
  transition:opacity .22s;
}
.s-nav-btn:hover {
  color:rgba(249,247,242,.82);
  background:rgba(255,255,255,.055);
}
.s-nav-btn:hover .nav-icon { opacity:1; }
.s-nav-btn.on {
  color:rgba(249,247,242,.95);
  background:rgba(255,255,255,.09);
  font-weight:600;
}
.s-nav-btn.on .nav-icon { opacity:1; }
.s-nav-btn.on::before {
  content:'';
  position:absolute;
  left:0; top:50%;
  transform:translateY(-50%);
  width:2.5px;
  height:50%;
  background:var(--rust-l);
  border-radius:0 2px 2px 0;
}
/* 캘린더 불투명도 살짝 낮춰 밀도 완화 */
.sidebar-close { display:none; position:absolute; top:20px; right:20px; background:none; border:none; color:var(--rust-l); cursor:pointer; font-size:24px; }
.overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:150; opacity:0; transition:opacity .35s; pointer-events:none; }
.overlay.active { opacity:1; pointer-events:auto; }

/* TOPBAR */
.topbar {
  display:flex;
  align-items:center;
  justify-content:center;
  position:sticky;
  top:0;
  min-height:64px;
  padding:10px 16px;
  background:rgba(249,247,242,.95);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border-bottom:1px solid var(--paper3);
  z-index:100;
}
.tab-group { display:flex; gap:35px; }
.tab-btn { background:none; border:none; color:rgba(44,40,35,.82); cursor:pointer; font-family:'Noto Serif KR',serif; font-size:13.5px; padding:10px 0; position:relative; transition:color .3s; white-space:nowrap; font-weight:500; }
.tab-btn.on { color:var(--ink); font-weight:500; }
.tab-btn.on::after { content:''; position:absolute; bottom:-1px; left:0; right:0; height:2px; background:var(--rust); border-radius:2px 2px 0 0; }
.write-trigger { background:var(--ink); color:var(--white); border:none; padding:8px 18px; border-radius:30px; cursor:pointer; font-size:12.5px; font-family:'Noto Serif KR',serif; display:flex; align-items:center; gap:7px; flex-shrink:0; transition:background .2s; }
.write-trigger:hover { background:var(--rust); }
.topbar-brand { display:none; position:absolute; left:50%; transform:translateX(-50%); font-family:'Playfair Display',serif; font-size:20px; font-weight:900; color:var(--ink); pointer-events:none; background:none; border:none; padding:6px 12px; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.hamburger { display:none; background:none; border:none; cursor:pointer; flex-direction:column; gap:5px; padding:4px; }
.hamburger span { display:block; width:22px; height:2px; background:var(--ink); border-radius:2px; }

/* LOGOUT BUTTON */
.logout-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(181,106,76,.10);
  border: 1.5px solid rgba(181,106,76,.30);
  border-radius: 30px;
  padding: 7px 16px 7px 10px;
  cursor: pointer;
  font-family: 'Pretendard', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--rust);
  letter-spacing: .02em;
  transition: all .22s ease;
  flex-shrink: 0;
  white-space: nowrap;
}
.logout-btn:hover {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
}
.logout-btn:hover .logout-icon {
  filter: brightness(0) invert(1);
}
.logout-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  transition: filter .22s ease;
}
/* 모바일에서 텍스트 숨기고 아이콘만 */
@media (max-width: 680px) {
  .logout-btn {
    padding: 6px 10px;
    gap: 0;
    position: absolute;
    right: 62px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    justify-content: center;
  }
  .logout-btn-text { display: none; }
  .logout-icon { width: 20px; height: 20px; }
}
/* ── Topbar 카카오 로그인 ── */
.topbar-kakao-area {
  position:absolute;
  right:24px;
  display:flex;
  align-items:center;
  gap:10px;
}
.topbar-kakao-btn {
  display:flex;
  align-items:center;
  cursor:pointer;
  border:none;
  background:none;
  padding:0;
  -webkit-tap-highlight-color:transparent;
}
.topbar-kakao-btn img {
  height:32px;
  width:auto;
  border-radius:6px;
  transition:opacity .2s;
}
.topbar-kakao-btn:hover img { opacity:.85; }
.topbar-user-info {
  display:none;
  align-items:center;
  gap:8px;
}
.topbar-user-avatar {
  width:30px;
  height:30px;
  border-radius:50%;
  object-fit:cover;
  border:1.5px solid var(--paper3);
  display:none;
}
.topbar-user-avatar.show { display:block; }
.topbar-user-default {
  width:30px;
  height:30px;
  border-radius:50%;
  background:var(--paper3);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}
.topbar-user-default svg { opacity:.5; }
.topbar-user-name {
  font-size:12.5px;
  font-family:'Pretendard',sans-serif;
  color:var(--ink2);
  font-weight:500;
  white-space:nowrap;
}
/* ── 로그아웃 버튼 (데스크탑: pill / 모바일: 원형 아이콘) ── */
.topbar-logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(181,106,76,.10);
  border: 1.5px solid rgba(181,106,76,.30);
  border-radius: 30px;
  padding: 7px 14px 7px 10px;
  cursor: pointer;
  text-decoration: none;
  font-family: 'Pretendard', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--rust);
  letter-spacing: .02em;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: all .22s ease;
}
.topbar-logout-btn:hover {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
}
.topbar-logout-btn:hover .topbar-logout-icon-svg { stroke: #fff; }
.topbar-logout-icon-svg {
  width: 15px;
  height: 15px;
  stroke: var(--rust);
  flex-shrink: 0;
  transition: stroke .22s ease;
}
.topbar-logout-btn-text { line-height: 1; }

/* ── 모바일: 원형 아이콘 버튼 ── */
@media (max-width:680px) {
  .topbar-kakao-area { right:16px; }
  .topbar-user-name { display:none; }
  .topbar-kakao-btn img { height:28px; }
  .topbar-logout-btn {
    padding: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    justify-content: center;
    gap: 0;
  }
  .topbar-logout-btn-text { display: none; }
  .topbar-logout-icon-svg { width: 16px; height: 16px; }
}


/* CONTENT */
.content-area { padding:50px; max-width:1240px; margin:0 auto; }
.page { display:none; }
.page.active { display:block; animation:fadeIn .6s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }

/* ===== 매거진 리스트 UI ===== */
.record-toolbar { display:flex; align-items:center; justify-content:space-between; margin-bottom:32px; }
.record-toolbar-title { font-family:'Noto Serif KR',serif; font-size:11px; color:var(--muted); letter-spacing:.2em; text-transform:uppercase; font-weight:500; }
.board-empty { padding:80px 0; text-align:center; }
.board-empty p { color:var(--muted); font-size:14px; }
.magazine-grid { display:flex; flex-direction:column; }

/* 피처드 카드 */
.mag-featured { display:grid; grid-template-columns:1fr 1fr; min-height:320px; border-bottom:1px solid var(--paper3); cursor:pointer; transition:background .2s; margin-bottom:4px; }
.mag-featured:hover { background:var(--paper2); }
.mag-img-side { overflow:hidden; background:var(--paper3); position:relative; }
.mag-img-side img { width:100%; height:100%; object-fit:cover; transition:transform .5s; display:block; }
.mag-featured:hover .mag-img-side img { transform:scale(1.03); }
.mag-no-img { width:100%; height:100%; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#e8ddd0,#c8b090); position:relative; overflow:hidden; }
.mag-no-img::before { content:'\201C'; font-family:'Playfair Display',serif; font-size:240px; font-weight:900; color:rgba(44,40,35,.06); position:absolute; top:-40px; right:-10px; line-height:1; pointer-events:none; }
.mag-text-side { padding:44px 48px; display:flex; flex-direction:column; justify-content:center; }
.mag-tag { font-size:10px; text-transform:uppercase; letter-spacing:.18em; color:var(--rust); font-weight:600; font-family:'Pretendard',sans-serif; margin-bottom:14px; }
.mag-title { font-family:'Playfair Display',serif; font-size:clamp(20px,2.2vw,30px); font-weight:700; line-height:1.3; color:var(--ink); margin-bottom:16px; }
.mag-excerpt { font-size:13.5px; color:var(--ink2); line-height:1.85; flex:1; font-family:'Pretendard',sans-serif; display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
.mag-footer { display:flex; align-items:center; justify-content:space-between; margin-top:22px; }
.mag-date { font-size:11px; color:var(--muted); font-family:'Pretendard',sans-serif; }
.mag-arrow { width:34px; height:34px; border-radius:50%; border:1.5px solid var(--paper3); display:flex; align-items:center; justify-content:center; color:var(--muted); transition:.25s; }
.mag-featured:hover .mag-arrow { background:var(--rust); border-color:var(--rust); color:#fff; }

/* ── 새 리스트 카드형 UI ── */
.post-list {
  display:flex;
  flex-direction:column;
  gap:0;
}
.post-card {
  display:grid;
  grid-template-columns:100px 1fr auto;
  align-items:center;
  gap:0;
  background:transparent;
  padding:18px 4px;
  border-bottom:1px solid var(--paper3);
  transition:all .2s ease;
  position:relative;
  cursor:pointer;
}
.post-card:first-child { border-top:1px solid var(--paper3); }
.post-card:hover { background:var(--paper2); }

/* 썸네일 */
.post-card-thumb {
  width:88px;
  height:72px;
  border-radius:8px;
  overflow:hidden;
  position:relative;
  flex-shrink:0;
}
.post-card-thumb img {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .4s;
}
.post-card:hover .post-card-thumb img { transform:scale(1.06); }
.post-card-no-thumb {
  width:88px;
  height:72px;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  opacity:.5;
  flex-shrink:0;
}
.c-travel { background:linear-gradient(135deg,#c8d8e8,#8faec8); }
.c-food   { background:linear-gradient(135deg,#e8d8c0,#c0a888); }
.c-think  { background:linear-gradient(135deg,#d8d0e0,#b0a4c0); }
.c-etc    { background:linear-gradient(135deg,#d0e0d0,#a0c0a0); }
.c-daily  { background:linear-gradient(135deg,#e8ddd0,#c8b090); }

/* 본문 영역 */
.post-card-body {
  padding:0 20px 0 16px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:5px;
  min-width:0;
}

/* 태그 (제목 위, 굵게) */
.post-card-tag {
  font-size:10px;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--rust);
  font-family:'Pretendard',sans-serif;
  display:flex;
  align-items:center;
  gap:6px;
}
.post-card-new {
  font-size:9px;
  font-weight:700;
  letter-spacing:.08em;
  color:var(--rust);
  background:rgba(181,106,76,.10);
  border:1px solid rgba(181,106,76,.28);
  border-radius:20px;
  padding:1px 6px;
}

/* 제목 */
.post-card-title {
  font-size:15px;
  font-weight:600;
  letter-spacing:-0.3px;
  line-height:1.4;
  color:var(--ink);
  transition:color .2s;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.post-card:hover .post-card-title { color:var(--rust); }

/* 본문 미리보기 */
.post-card-excerpt {
  font-size:12.5px;
  color:var(--muted);
  font-family:'Pretendard',sans-serif;
  line-height:1.55;
  display:-webkit-box;
  -webkit-line-clamp:1;
  -webkit-box-orient:vertical;
  overflow:hidden;
  opacity:.8;
}

/* 댓글 */
.post-card-stat {
  display:flex;
  align-items:center;
  gap:3px;
  font-size:11px;
  color:var(--muted);
  font-family:'Pretendard',sans-serif;
  opacity:.7;
}
.post-card-stat svg { opacity:.6; }

/* 날짜 (맨 오른쪽) */
.post-card-right {
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:center;
  gap:8px;
  flex-shrink:0;
  padding-left:12px;
}
.post-card-date {
  font-size:11px;
  color:var(--muted);
  font-family:'Pretendard',sans-serif;
  opacity:.7;
  white-space:nowrap;
}
/* 이전/다음 네비게이션 */
.post-nav { display:flex; justify-content:space-between; align-items:center; margin-top:48px; padding-top:24px; border-top:1px solid var(--paper3); gap:12px; }
.post-nav-btn { display:flex; align-items:center; gap:8px; background: rgba(0,0,0,0.05); border:2px solid var(--paper3); color:var(--text); padding:12px 20px; border-radius:6px; cursor:pointer; font-family:'Noto Serif KR',serif; font-size:14px; transition:.2s; max-width:45%; font-weight:500; }
.post-nav-btn:hover { background: var(--rust); border-color:var(--rust); color:white; }
.post-nav-btn.disabled { opacity:.3; pointer-events:none; }
.post-nav-label { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* 게시글 상세 */
.post-view { display:none; }
.post-view.active { display:block; animation:fadeIn .5s ease; }
.post-back { display:inline-flex; align-items:center; gap:8px; background:none; border:none; cursor:pointer; font-family:'Noto Serif KR',serif; font-size:13px; color:var(--muted); margin-bottom:36px; padding:0; transition:color .2s; }
.post-back:hover { color:var(--rust); }
.post-meta { display:flex; align-items:center; gap:12px; margin-bottom:16px; }
.post-tag { font-size:11px; text-transform:uppercase; letter-spacing:.1em; color:var(--rust); }
.post-date-meta { font-size:12px; color:var(--muted); }
.post-title { font-family:'Playfair Display',serif; font-size:clamp(24px,3.5vw,36px); font-weight:700; line-height:1.3; margin-bottom:0; color:var(--ink); letter-spacing:-.3px; }
.post-title-divider { border:none; border-top:2px solid var(--paper3); margin:22px 0 30px; }
.post-body { font-size:15.5px; line-height:2.1; color:var(--ink2); white-space:pre-wrap; font-family:'Pretendard',sans-serif; font-weight:400; margin-top:4px; }
.post-image { width:100%; max-width:640px; height:auto; object-fit:contain; border-radius:6px; margin-bottom:36px; display:block; }
.post-image.hidden { display:none; }
.post-divider { border:none; border-top:1px solid var(--paper3); margin:36px 0; }
.post-actions { display:flex; gap:10px; margin-top:40px; justify-content:flex-end; }
.btn-action-edit { background:none; border:1px solid var(--paper3); color:var(--muted); padding:9px 22px; border-radius:3px; cursor:pointer; font-family:'Noto Serif KR',serif; font-size:13px; transition:.2s; }
.btn-action-edit:hover { border-color:var(--ink); color:var(--ink); }
.btn-action-delete { background:none; border:1px solid #e0b0a0; color:var(--rust); padding:9px 22px; border-radius:3px; cursor:pointer; font-family:'Noto Serif KR',serif; font-size:13px; transition:.2s; }
.btn-action-delete:hover { background:var(--rust); color:#fff; border-color:var(--rust); }

/* 댓글 — 일상의 기록 */
.comment-section { margin-top:56px; }
.comment-section-title { font-family:'Playfair Display',serif; font-size:18px; font-weight:700; margin-bottom:24px; padding-bottom:12px; border-bottom:2px solid var(--paper3); }
.comment-list { display:flex; flex-direction:column; margin-bottom:28px; }
.comment-item { padding:18px 0; border-bottom:1px solid var(--paper3); }
.comment-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.comment-author { font-size:13px; font-weight:600; color:var(--ink); font-family:'Pretendard',sans-serif; }
.comment-date { font-size:11px; color:var(--muted); font-family:'Pretendard',sans-serif; }
.comment-body { font-size:14px; color:var(--ink2); line-height:1.75; font-family:'Pretendard',sans-serif; white-space:pre-wrap; }
.comment-del {
  background: none;
  border: 1px solid rgba(92,86,80,.22);
  cursor: pointer;
  font-size: 10.5px;
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 10px;
  transition: all .2s;
  margin-left: 8px;
  font-family: 'Pretendard', sans-serif;
  font-weight: 500;
  opacity: .7;
  flex-shrink: 0;
}
.comment-del:hover {
  color: var(--rust);
  background: rgba(181,106,76,.08);
  border-color: rgba(181,106,76,.35);
  opacity: 1;
}
.comment-form { background:var(--paper2); border-radius:6px; padding:20px; }
.comment-form-title { font-size:12px; color:var(--muted); margin-bottom:14px; letter-spacing:.05em; font-family:'Pretendard',sans-serif; }
.comment-name-row { display:flex; gap:10px; margin-bottom:10px; flex-wrap:wrap; }
.comment-input { padding:10px 12px; border:1px solid var(--paper3); border-radius:3px; font-family:'Pretendard',sans-serif; font-size:13.5px; background:var(--white); outline:none; transition:border .2s; color:var(--ink); }
.comment-input:focus { border-color:var(--rust); }
.comment-textarea { width:100%; padding:10px 12px; border:1px solid var(--paper3); border-radius:3px; font-family:'Pretendard',sans-serif; font-size:13.5px; background:var(--white); outline:none; resize:vertical; min-height:80px; transition:border .2s; color:var(--ink); margin-bottom:10px; }
.comment-textarea:focus { border-color:var(--rust); }
.comment-submit { background:var(--ink); color:#fff; border:none; padding:10px 24px; border-radius:3px; cursor:pointer; font-family:'Noto Serif KR',serif; font-size:13px; transition:background .2s; float:right; }
.comment-submit:hover { background:var(--rust); }
.comment-empty { padding:24px 0; text-align:center; color:var(--muted); font-size:13px; font-family:'Pretendard',sans-serif; }

/* 갤러리 */
.vision-toolbar { display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:28px; }
.vision-title-area h2 { font-family:'Playfair Display',serif; font-size:28px; font-weight:700; }
.vision-title-area p { font-size:13px; color:var(--muted); margin-top:6px; }
.view-toggle { display:flex; gap:6px; }
.vt-btn { background:none; border:1px solid var(--paper3); border-radius:4px; width:34px; height:34px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:.2s; color:var(--muted); }
.vt-btn.on { background:var(--ink); border-color:var(--ink); color:#fff; }
.vision-grid { display:grid; gap:6px; grid-template-columns:repeat(3,1fr); }
.vision-grid.col2 { grid-template-columns:repeat(2,1fr); gap:10px; }
.vision-grid.col1 { grid-template-columns:1fr; gap:20px; }
.vision-card {
  position:relative;
  cursor:pointer;
  overflow:hidden;
  border-radius:10px;
  background:var(--paper3);
  transition:all .25s ease;
}

.vision-card:hover {
  transform:translateY(-4px);
  box-shadow:0 12px 28px rgba(0,0,0,.15);
}
.v-img-wrap { width:100%; aspect-ratio:1/1; overflow:hidden; }
.vision-grid.col2 .v-img-wrap { aspect-ratio:4/3; }
/* col1: 이미지 전체 보이는 인스타그램 스타일 */
.vision-grid.col1 { grid-template-columns:1fr; gap:28px; max-width:600px; margin:0 auto; }
.vision-grid.col1 .vision-card {
  background:var(--paper2);
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 4px 14px rgba(0,0,0,.08);
  border:1px solid rgba(0,0,0,.05);
  margin-bottom:6px;
}
.vision-grid.col1 .v-img-wrap { aspect-ratio:unset; height:auto; overflow:hidden; border-radius:8px 8px 0 0; }
.vision-grid.col1 .v-img-wrap img { height:auto; object-fit:contain; max-height:none; border-radius:8px 8px 0 0; background:var(--paper3); }
.v-img-wrap img { width:100%; height:100%; object-fit:cover; transition:transform .5s; display:block; }
.vision-card:hover .v-img-wrap img { transform:scale(1.04); }
.vision-grid.col1 .vision-card:hover .v-img-wrap img { transform:none; }
.v-overlay { position:absolute; inset:0; background:linear-gradient(to top,rgba(30,25,20,.78) 0%,transparent 55%); opacity:0; transition:opacity .35s; display:flex; align-items:flex-end; padding:16px; border-radius:3px; }
.vision-card:hover .v-overlay { opacity:1; }
/* col1 캡션은 이미지 아래 별도 표시 */
.vision-grid.col1 .v-overlay { display:none; }
.vision-grid.col1 .v-caption-below { display:block; }
.v-caption-below {
  padding:14px 18px 18px;
  background:var(--paper2);
  border-radius:0 0 10px 10px;
}
.v-caption-below .v-cap-text { font-size:13.5px; color:var(--ink2); font-family:'Pretendard',sans-serif; line-height:1.6; }
.v-caption-below .v-cap-date { font-size:11px; color:var(--muted); margin-top:6px; font-family:'Pretendard',sans-serif; opacity:.7; }
.v-caption { color:#fff; font-size:13px; line-height:1.45; }
.v-date-badge { font-size:10px; color:rgba(255,255,255,.6); margin-top:4px; }
.vision-empty { grid-column:1/-1; padding:80px 0; text-align:center; }
.vision-empty p { color:var(--muted); font-size:14px; }
/* ═══════════════════════════════════════════════
   MASONRY GRID — 일상의 기록 & 시선과 머무름 공용
   ═══════════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(22px); }
  to   { opacity:1; transform:translateY(0); }
}

/* 컨테이너: CSS columns 방식 메이슨리 */
.masonry-grid {
  column-count: 2;
  column-gap: 28px;
  orphans: 1;
  widows: 1;
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeInUp .55s ease forwards;
}
/* 카드 로드 딜레이 (순차 등장) */
.masonry-item:nth-child(1)  { animation-delay: .04s; }
.masonry-item:nth-child(2)  { animation-delay: .10s; }
.masonry-item:nth-child(3)  { animation-delay: .16s; }
.masonry-item:nth-child(4)  { animation-delay: .22s; }
.masonry-item:nth-child(5)  { animation-delay: .28s; }
.masonry-item:nth-child(6)  { animation-delay: .34s; }
.masonry-item:nth-child(7)  { animation-delay: .40s; }
.masonry-item:nth-child(8)  { animation-delay: .46s; }
.masonry-item:nth-child(n+9){ animation-delay: .50s; }

/* ── Type A : 일상의 기록 카드 (이미지 + 텍스트 메이슨리) ── */
.mc-record {
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .28s ease, box-shadow .28s ease;
  position: relative;
  background: var(--paper);
  border: 1px solid rgba(44,40,35,.07);
}
.mc-record:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(44,40,35,.16);
}
/* 태그별 배경 파스텔 (이미지 없을 때만 실질적 배경) */
.mc-record.bg-daily  { background: #f5f0e8; }
.mc-record.bg-travel { background: #eaf0f7; }
.mc-record.bg-food   { background: #f7f0e6; }
.mc-record.bg-think  { background: #f0eef6; }
.mc-record.bg-etc    { background: #edf4ed; }

/* 이미지 있을 땐 흰 카드처럼 */
.mc-record.has-img { background: var(--white); }

/* ── 카드 이미지 영역 ── */
.mc-record-img-wrap {
  width: 100%;
  overflow: hidden;
  position: relative;
  background: var(--paper3);
}
.mc-record-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  /* 세피아 필터: 기본 상태 */
  filter: saturate(0.78) sepia(0.12) brightness(0.97);
  transition: transform .55s ease, filter .45s ease;
}
/* 호버: 원본 색상 복원 + 살짝 줌 */
.mc-record:hover .mc-record-img-wrap img {
  filter: saturate(1) sepia(0) brightness(1);
  transform: scale(1.04);
}

/* 호버 오버레이: 본문 미리보기 */
.mc-record-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30,25,18,.72) 0%, rgba(30,25,18,.18) 55%, transparent 100%);
  opacity: 0;
  transition: opacity .38s ease;
  display: flex;
  align-items: flex-end;
  padding: 18px 20px;
  pointer-events: none;
}
.mc-record:hover .mc-record-img-overlay { opacity: 1; }
.mc-record-overlay-text {
  color: rgba(249,247,242,.88);
  font-size: 12.5px;
  font-family: 'Pretendard', sans-serif;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── 카드 텍스트 배너 (이미지 없을 때) ── */
.mc-record-banner {
  height: 6px;
  width: 100%;
}
.mc-record.has-img .mc-record-banner { display: none; }
.mc-record.bg-daily  .mc-record-banner { background: linear-gradient(90deg,#c8a87a,#e8d5b0); }
.mc-record.bg-travel .mc-record-banner { background: linear-gradient(90deg,#7aaed0,#b8d4ea); }
.mc-record.bg-food   .mc-record-banner { background: linear-gradient(90deg,#c8986a,#e8c898); }
.mc-record.bg-think  .mc-record-banner { background: linear-gradient(90deg,#9a8cc0,#c8bce0); }
.mc-record.bg-etc    .mc-record-banner { background: linear-gradient(90deg,#7ab07a,#b0d0b0); }

/* ── 이미지 없는 카드 색 바 (홈 화면 최신글과 동일 형태) ── */
.mc-record .hl-record-bar {
  height: 4px;
  width: 100%;
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--rust), var(--rust-l));
}
.mc-record.bg-travel .hl-record-bar { background: linear-gradient(90deg,#7aaed0,#b8d4ea); }
.mc-record.bg-food   .hl-record-bar { background: linear-gradient(90deg,#c8986a,#e8c898); }
.mc-record.bg-think  .hl-record-bar { background: linear-gradient(90deg,#9a8cc0,#c8bce0); }
.mc-record.bg-etc    .hl-record-bar { background: linear-gradient(90deg,#7ab07a,#b0d0b0); }

/* ── 이미지 없는 카드 그라데이션 플레이스홀더 ── */
.mc-record .record-no-img-bg {
  width: 100%;
  height: 160px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  opacity: .25;
}
.mc-record.bg-daily  .record-no-img-bg { background: linear-gradient(135deg,#e8ddd0,#c8b090); }
.mc-record.bg-travel .record-no-img-bg { background: linear-gradient(135deg,#c8d8e8,#8faec8); }
.mc-record.bg-food   .record-no-img-bg { background: linear-gradient(135deg,#e8d8c0,#c0a888); }
.mc-record.bg-think  .record-no-img-bg { background: linear-gradient(135deg,#d8d0e0,#b0a4c0); }
.mc-record.bg-etc    .record-no-img-bg { background: linear-gradient(135deg,#d0e0d0,#a0c0a0); }

/* ── 카드 바디 ── */
.mc-record-body { padding: 20px 22px 18px; }
/* 이미지 있을 때 바디 패딩 약간 줄임 */
.mc-record.has-img .mc-record-body { padding: 16px 18px 16px; }

.mc-record-tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--rust);
  font-family: 'Pretendard', sans-serif;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* 이미지 있는 카드는 태그 생략 (제목·날짜만) */
.mc-record.has-img .mc-record-tag { margin-bottom: 6px; }

.mc-record-new {
  font-size: 8.5px;
  font-weight: 700;
  color: var(--rust);
  background: rgba(181,106,76,.12);
  border: 1px solid rgba(181,106,76,.3);
  border-radius: 20px;
  padding: 1px 7px;
  letter-spacing: .06em;
}
.mc-record-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(15px, 1.4vw, 19px);
  font-weight: 700;
  line-height: 1.38;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -.2px;
  transition: color .2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mc-record:hover .mc-record-title { color: var(--rust-d); }

/* 본문 미리보기: 이미지 없을 때만 */
.mc-record-excerpt {
  font-size: 13px;
  color: var(--ink2);
  font-family: 'Pretendard', sans-serif;
  line-height: 1.85;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
  opacity: .85;
}
.mc-record.has-img .mc-record-excerpt { display: none; }

.mc-record-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(44,40,35,.08);
}
.mc-record-date {
  font-size: 11px;
  color: var(--muted);
  font-family: 'Pretendard', sans-serif;
  opacity: .7;
}
.mc-record-cmt {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  font-family: 'Pretendard', sans-serif;
  opacity: .6;
}

/* 큰따옴표 데코 (이미지 없는 카드에만) */
.mc-record-deco {
  position: absolute;
  bottom: -10px;
  right: 16px;
  font-family: 'Playfair Display', serif;
  font-size: 110px;
  font-weight: 900;
  color: rgba(44,40,35,.05);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.mc-record.has-img .mc-record-deco { display: none; }

/* ── Type B : 시선과 머무름 카드 (이미지 풀) ── */
.mc-vision {
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .28s ease, box-shadow .28s ease;
  position: relative;
  background: var(--paper3);
}
.mc-vision:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}
.mc-vision-img {
  width: 100%;
  display: block;
  max-height: 520px;
  object-fit: cover;
  transition: transform .6s ease;
}
.mc-vision:hover .mc-vision-img { transform: scale(1.04); }
.mc-vision-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(20,15,10,.80) 0%, rgba(20,15,10,.35) 50%, transparent 100%);
  padding: 32px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mc-vision-caption {
  font-family: 'Pretendard', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: rgba(249,247,242,.9);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mc-vision-date {
  font-family: 'Pretendard', sans-serif;
  font-size: 10.5px;
  color: rgba(249,247,242,.42);
}

/* 빈 상태 */
.masonry-empty { padding: 80px 0; text-align: center; }
.masonry-empty p { color: var(--muted); font-size: 14px; }

/* 반응형 */
@media (max-width: 680px) {
  .masonry-grid { column-count: 1; column-gap: 0; }
  .masonry-item { margin-bottom: 18px; }
  .mc-record-body { padding: 20px 20px 18px; }
  .mc-record-title { font-size: 17px; }
  .mc-record-excerpt { -webkit-line-clamp: 3; }
  .mc-vision-img { max-height: 380px; }
}
@media (min-width: 681px) and (max-width: 900px) {
  .masonry-grid { column-gap: 20px; }
  .masonry-item { margin-bottom: 20px; }
}


/* 갤러리 댓글 */
.lb-comment-section { margin-top:20px; border-top:1px solid rgba(255,255,255,.12); padding-top:16px; }
.lb-comment-title { font-size:11px; color:rgba(255,255,255,.35); letter-spacing:.12em; text-transform:uppercase; margin-bottom:12px; font-family:'Pretendard',sans-serif; }
.lb-comment-list { display:flex; flex-direction:column; gap:8px; margin-bottom:12px; max-height:160px; overflow-y:auto; }
.lb-comment-item { background:rgba(255,255,255,.06); border-radius:4px; padding:10px 12px; }
.lb-comment-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:4px; }
.lb-comment-author { font-size:12px; font-weight:600; color:rgba(255,255,255,.75); font-family:'Pretendard',sans-serif; }
.lb-comment-date { font-size:10px; color:rgba(255,255,255,.3); font-family:'Pretendard',sans-serif; }
.lb-comment-body { font-size:12.5px; color:rgba(255,255,255,.6); line-height:1.5; font-family:'Pretendard',sans-serif; }
.lb-comment-del {
  background: none;
  border: 1px solid rgba(255,255,255,.18);
  cursor: pointer;
  color: rgba(255,255,255,.45);
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 10px;
  transition: all .2s;
  margin-left: 6px;
  font-family: 'Pretendard', sans-serif;
  font-weight: 500;
  flex-shrink: 0;
}
.lb-comment-del:hover {
  color: var(--rust-l);
  background: rgba(217,155,130,.15);
  border-color: rgba(217,155,130,.4);
}
.lb-comment-form { display:flex; gap:6px; flex-wrap:wrap; }
.lb-comment-input { padding:8px 10px; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.15); border-radius:3px; color:#fff; font-size:12.5px; font-family:'Pretendard',sans-serif; outline:none; }
.lb-comment-input::placeholder { color:rgba(255,255,255,.3); }
.lb-comment-input:focus { border-color:var(--rust-l); }
.lb-comment-textarea { width:100%; padding:8px 10px; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.15); border-radius:3px; color:#fff; font-size:12.5px; font-family:'Pretendard',sans-serif; outline:none; resize:none; height:56px; }
.lb-comment-textarea:focus { border-color:var(--rust-l); }
.lb-comment-submit { padding:8px 16px; background:var(--rust); border:none; border-radius:3px; color:#fff; font-size:12px; cursor:pointer; font-family:'Noto Serif KR',serif; transition:background .2s; }
.lb-comment-submit:hover { background:var(--rust-d); }

/* 라이트박스 */
.lightbox { position:fixed; inset:0; background:rgba(15,12,10,.96); z-index:2000; display:none; align-items:flex-start; justify-content:center; padding:24px; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; }
.lightbox.active { display:flex; animation:fadeIn .25s ease; }
.lb-inner { max-width:860px; width:100%; margin:auto; }
.lb-img { width:100%; max-height:60vh; object-fit:contain; border-radius:4px; display:block; }
.lb-caption { color:rgba(255,255,255,.75); font-size:14.5px; margin-top:18px; line-height:1.6; }
.lb-date { color:rgba(255,255,255,.3); font-size:12px; margin-top:6px; }
.lb-close { position:fixed; top:22px; right:26px; background:none; border:none; color:rgba(255,255,255,.5); cursor:pointer; font-size:30px; line-height:1; transition:color .2s; z-index:2010; }
.lb-close:hover { color:#fff; }
.lb-actions { display:flex; gap:10px; margin-top:16px; justify-content:flex-end; }
.lb-btn-edit,.lb-btn-delete { background:none; border:1px solid rgba(255,255,255,.25); color:rgba(255,255,255,.6); padding:7px 18px; border-radius:3px; cursor:pointer; font-family:'Noto Serif KR',serif; font-size:12px; transition:.2s; }
.lb-btn-edit:hover { border-color:rgba(255,255,255,.8); color:#fff; }
.lb-btn-delete:hover { background:var(--rust); border-color:var(--rust); color:#fff; }

/* 나라는 사람 */
.profile-wrap {
  display:flex;
  gap:80px;
  align-items:flex-start;
}
.profile-img {
  width:300px;
  flex-shrink:0;
  border-radius:10px;
  overflow:hidden;
  background:var(--paper3);

  /* ✨ 핵심 */
  box-shadow:0 10px 30px rgba(0,0,0,.15);
}
/* 제거 */
.profile-img::after {
  display:none;
}
.profile-video { width:100%; height:420px; object-fit:cover; border-radius:4px; display:block; background:var(--paper3); }
.profile-info { flex:1; min-width:0; }
.profile-name {
  font-size:34px;
  font-weight:700;
  margin-bottom:16px;
}
.profile-bio { font-size:15.5px; line-height:1.9; color:var(--ink2); margin-bottom:36px; }
.interest-label { font-size:14px; margin-bottom:12px; border-bottom:2px solid var(--rust); display:inline-block; padding-bottom:2px; }
.interest-item {
  border-bottom:1px solid var(--paper3);
  padding:14px 0;
  font-size:14.5px;
  transition:all .2s;
  padding-left:4px;
}

.interest-item:hover {
  color:var(--rust);
  padding-left:10px;
}

/* 모달 공통 */
.modal,.edit-modal,.pw-modal,.monthly-modal { position:fixed; inset:0; background:rgba(44,40,35,.82); backdrop-filter:blur(6px); display:none; align-items:center; justify-content:center; padding:20px; }
.modal { z-index:2100; } .edit-modal { z-index:2200; } .pw-modal { z-index:2300; }
.modal.active,.edit-modal.active,.pw-modal.active,.monthly-modal.active { display:flex; }
.modal-inner {
  background:var(--paper); width:100%; max-width:640px;
  border-radius:6px; position:relative;
  max-height:92vh;
  display:flex; flex-direction:column;
  overflow:hidden;
}
/* 모달 헤더: 닫기 버튼 항상 고정 */
.modal-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:22px 28px 0;
  flex-shrink:0;
}
/* 모달 스크롤 본문 */
.modal-body {
  padding:20px 28px 36px;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  flex:1;
  min-height:0;
}
.close-modal {
  cursor:pointer; font-size:28px; background:none; border:none;
  color:var(--ink); line-height:1; padding:4px 4px;
  flex-shrink:0; margin-left:auto;
  transition:color .2s;
}
.close-modal:hover { color:var(--rust); }
.modal-heading { font-family:'Playfair Display',serif; font-size:22px; margin-bottom:0; }
.modal-cat-tabs { display:flex; margin-bottom:28px; border:1px solid var(--paper3); border-radius:4px; overflow:hidden; }
.modal-cat-tab { flex:1; padding:11px; text-align:center; cursor:pointer; font-family:'Noto Serif KR',serif; font-size:13px; border:none; background:none; color:var(--muted); transition:.25s; }
.modal-cat-tab.on { background:var(--ink); color:#fff; }
.modal-record-fields,.modal-vision-fields { display:none; }
.modal-record-fields.show,.modal-vision-fields.show { display:block; }
.input-row { margin-bottom:20px; }
.input-row label { display:block; font-size:11px; text-transform:uppercase; letter-spacing:.08em; margin-bottom:8px; color:var(--muted); }
.input-row input,.input-row textarea { width:100%; padding:12px 14px; border:1px solid var(--paper3); outline:none; font-family:'Noto Serif KR',serif; font-size:14px; background:var(--white); border-radius:3px; transition:border .2s; }
.input-row input:focus,.input-row textarea:focus { border-color:var(--rust); }
.input-row textarea { resize:vertical; }
.img-upload-area { border:1.5px dashed var(--paper3); border-radius:4px; padding:28px; text-align:center; cursor:pointer; transition:.2s; position:relative; }
.img-upload-area:hover { border-color:var(--rust); background:var(--paper2); }
.img-upload-area input[type=file] { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; height:100%; }
.img-upload-area p { color:var(--muted); font-size:13px; margin-top:6px; }
.img-upload-area small { font-size:11px; color:var(--muted); opacity:.6; margin-top:4px; display:block; }
.img-preview { width:100%; max-height:200px; object-fit:cover; border-radius:4px; display:none; margin-top:12px; }
.img-preview.show { display:block; }
.btn-save { background:var(--rust); color:#fff; border:none; padding:15px; width:100%; cursor:pointer; margin-top:6px; font-family:'Noto Serif KR',serif; font-size:14px; border-radius:3px; transition:background .2s; }
.btn-save:hover { background:var(--rust-d); }
.current-img-wrap { position:relative; margin-bottom:10px; }
.current-img-wrap img { width:100%; max-height:180px; object-fit:cover; border-radius:4px; display:block; }
.current-img-label { font-size:11px; color:var(--muted); margin-bottom:6px; font-family:'Pretendard',sans-serif; }
.remove-img-btn { position:absolute; top:26px; right:6px; background:rgba(44,40,35,.7); color:#fff; border:none; border-radius:50%; width:24px; height:24px; cursor:pointer; font-size:14px; display:flex; align-items:center; justify-content:center; transition:background .2s; }
.remove-img-btn:hover { background:var(--rust); }

/* 비밀번호 모달 */
.pw-box { background:var(--paper); width:100%; max-width:360px; padding:36px; border-radius:6px; }
.pw-box h4 { font-family:'Playfair Display',serif; font-size:18px; margin-bottom:6px; }
.pw-box p { font-size:12px; color:var(--muted); margin-bottom:20px; }
.pw-box input { width:100%; padding:11px 14px; border:1px solid var(--paper3); border-radius:3px; font-family:'Noto Serif KR',serif; font-size:14px; outline:none; margin-bottom:16px; transition:border .2s; background:var(--white); }
.pw-box input:focus { border-color:var(--rust); }
.pw-btn-row { display:flex; gap:10px; }
.pw-btn-row button { flex:1; padding:11px; border-radius:3px; cursor:pointer; font-family:'Noto Serif KR',serif; font-size:13px; border:none; transition:.2s; }
.pw-confirm { background:var(--ink); color:#fff; } .pw-confirm:hover { background:var(--rust); }
.pw-cancel { background:var(--paper2); color:var(--muted); } .pw-cancel:hover { background:var(--paper3); }

/* 모바일 탭바 */
.mobile-tabbar { display:none; position:fixed; bottom:0; left:0; right:0; min-height:60px; height:calc(60px + env(safe-area-inset-bottom, 0px)); background:rgba(249,247,242,.96); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); border-top:1px solid var(--paper3); z-index:160; align-items:flex-start; justify-content:space-around; padding:6px 6px 0; padding-bottom:env(safe-area-inset-bottom, 0px); }
.mobile-tab-btn { background:none; border:none; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:3px; padding:8px 12px; font-family:'Pretendard',sans-serif; font-size:10.5px; font-weight:500; color:var(--muted); transition:all .2s; -webkit-tap-highlight-color:transparent; touch-action:manipulation; border-radius:8px; }
.mobile-tab-btn.on { color:var(--rust); background: rgba(181,106,76,0.1); font-weight:600; transform: scale(1.05); }
.mobile-tab-btn.write-btn { color:var(--ink); }

/* 플로팅 기록 버튼 */
.floating-write-btn {
  position:fixed;
  bottom:calc(78px + env(safe-area-inset-bottom, 0px));
  right:20px;
  width:56px;
  height:56px;
  border-radius:50%;
  background:var(--rust);
  color:#fff;
  border:none;
  font-size:32px;
  font-weight:300;
  line-height:1;
  cursor:pointer;
  display:none;
  align-items:center;
  justify-content:center;
  box-shadow:0 4px 16px rgba(181,106,76,.4);
  z-index:150;
  transition:all .25s ease;
}
.floating-write-btn:hover {
  background:var(--rust-d);
  transform:scale(1.1);
  box-shadow:0 6px 24px rgba(181,106,76,.5);
}
.floating-write-btn:active {
  transform:scale(0.95);
}

/* ===== 모바일 하단 네비 (미사용 — mobile-tabbar로 대체됨) ===== */
/* .bottom-nav { ... } 은 HTML에 없으므로 제거 */


/* 반응형 */
@media (max-width:900px) {
  :root { --sidebar-w:260px; }
  .content-area { padding:40px 30px; }
  .topbar { padding:0 30px; }
  .mag-featured { grid-template-columns:1fr; min-height:auto; }
  .mag-img-side { height:220px; }
  .mag-text-side { padding:28px 30px; }
  .vision-grid { grid-template-columns:repeat(2,1fr); }
  .profile-wrap { flex-direction:column; gap:36px; }
  .profile-img { width:100%; }
  .profile-img::after { display:none; }
}
@media (max-width:768px) {
  .topbar {
    padding:10px 16px;
  }
}

/* 캘린더 모드: 날짜 한 줄 표시 */

@media (max-width:680px) {
  .sidebar { transform:translateX(-100%); width:240px; padding:28px 18px 24px; }
  .sidebar-copyright { padding-top:10px; font-size:9px; }
        .owner-name { font-size:26px; }
  .owner-tagline { font-size:14px; margin-bottom:14px; }
  .sidebar.open { transform:translateX(0); }
  .sidebar-close { display:block; }
  .overlay { display:block; }
  .main { margin-left:0; }
  .topbar { padding:0 18px; height:56px; }
  .tab-group { display:none; }
  .topbar-brand {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  position:static;
  transform:none;
  pointer-events:auto;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}

  .topbar-brand .brand-word {
  font-size:16px;
  line-height:1.1;
  color:var(--ink); /* 좀 더 가독성 높은 기본 텍스트 색상 */
}

.topbar-brand .brand-sub {
  font-size:10px;
  margin-top:2px;
  color:var(--muted); /* 부가 설명은 은은하게 */
}

  .hamburger { 
    display:flex;
    position:absolute;
    left:16px;
  }
  .content-area { padding:22px 18px 80px; }
  .mag-featured { grid-template-columns:1fr; }
  .mag-img-side { height:180px; }
  .mag-text-side { padding:20px; }
  .post-card { grid-template-columns:80px 1fr auto; gap:0; min-height:80px; padding:14px 6px; }
  .post-card-thumb { width:72px; height:64px; }
  .post-card-no-thumb { width:72px; height:64px; }
  .post-card-body { padding:0 10px 0 14px; gap:4px; }
  .post-card-title { font-size:13.5px; white-space:normal; -webkit-line-clamp:2; display:-webkit-box; -webkit-box-orient:vertical; overflow:hidden; }
  .post-card-excerpt { display:none; }
  .post-card-right { gap:5px; padding-left:6px; min-width:52px; }
  .post-card-date { font-size:10px; }
  .post-card-stat { font-size:10px; }
  .post-nav-btn { padding:10px 14px; font-size:13px; }
  .record-toolbar .write-trigger,.view-toggle .write-trigger { display:none !important; }
  .vision-grid { grid-template-columns:repeat(2,1fr); gap:4px; }
  .vision-grid.col1 { grid-template-columns:1fr; gap:20px; max-width:100%; }
  .vision-toolbar { flex-direction:column; align-items:flex-start; gap:14px; }
  .view-toggle { align-self:flex-end; }
  .modal,.edit-modal { align-items:flex-end; padding:0; }
  .modal-inner { border-radius:16px 16px 0 0; max-height:88vh; }
  .modal-header { padding:18px 20px 0; }
  .modal-body { padding:14px 20px 48px; }
  .modal-heading { font-size:18px; }
  .pw-modal { padding:20px; }
  .profile-name { font-size:22px; }
  .profile-bio { font-size:14px; margin-bottom:24px; }
  .mobile-tabbar { display:flex; }
  .floating-write-btn { display:flex; }
}



/* ===== 홈 페이지 ===== */
.home-hero {
  position:relative;
  min-height:320px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  overflow:hidden;
  border-radius:16px;
  margin-bottom:48px;
  background-image:
    linear-gradient(90deg, rgba(42,36,32,.88) 0%, rgba(42,36,32,.75) 40%, rgba(42,36,32,.65) 70%, rgba(42,36,32,.5) 100%),
    url('images/hero-bg.jpg');
  background-size:cover;
  background-position:center right;
  background-attachment:scroll;
}
.home-hero::after {
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(to right, rgba(42,36,32,.9) 0%, rgba(42,36,32,.7) 50%, transparent 100%);
  pointer-events:none;
  z-index:0;
}
.home-hero-deco {
  position:absolute;
  top:-40px; right:-30px;
  font-family:'Playfair Display',serif;
  font-size:320px;
  font-weight:900;
  color:rgba(255,255,255,.025);
  line-height:1;
  pointer-events:none;
  z-index:0;
  user-select:none;
}
.home-hero-content {
  position:relative;
  z-index:1;
  padding:28px 56px;
}
.home-hero-eyebrow {
  font-family:'Pretendard',sans-serif;
  font-size:10px;
  font-weight:600;
  letter-spacing:.28em;
  text-transform:uppercase;
  color:var(--rust-l);
  margin-bottom:20px;
  display:flex;
  align-items:center;
  gap:10px;
}
.home-hero-eyebrow::before {
  content:'';
  display:inline-block;
  width:28px;
  height:1px;
  background:var(--rust-l);
  opacity:.6;
}
.home-hero-title {
  font-family:'Playfair Display',serif;
  font-size:clamp(36px,5vw,62px);
  font-weight:900;
  font-style:italic;
  color:#f9f7f2;
  line-height:1.1;
  margin-bottom:20px;
  letter-spacing:-.5px;
}
.home-hero-sub {
  font-family:'Noto Serif KR',serif;
  font-size:15px;
  color:rgba(249,247,242,.5);
  line-height:1.8;
  font-weight:300;
  max-width:420px;
}
.home-hero-actions {
  display:flex;
  gap:14px;
  margin-top:36px;
  flex-wrap:wrap;
}
.home-btn-primary {
  background:var(--rust);
  color:#fff;
  border:none;
  padding:13px 28px;
  border-radius:40px;
  cursor:pointer;
  font-family:'Noto Serif KR',serif;
  font-size:13.5px;
  font-weight:500;
  transition:all .25s;
  display:flex;
  align-items:center;
  gap:8px;
}
.home-btn-primary:hover { background:var(--rust-d); transform:translateY(-1px); box-shadow:0 8px 20px rgba(181,106,76,.35); }
.home-btn-ghost {
  background:rgba(255,255,255,.08);
  color:rgba(249,247,242,.7);
  border:1px solid rgba(249,247,242,.15);
  padding:13px 28px;
  border-radius:40px;
  cursor:pointer;
  font-family:'Noto Serif KR',serif;
  font-size:13.5px;
  transition:all .25s;
}
.home-btn-ghost:hover { background:rgba(255,255,255,.14); color:#f9f7f2; border-color:rgba(249,247,242,.3); }

/* 홈 섹션 그리드 */
.home-sections {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-bottom:36px;
}
.home-section-card {
  background:var(--paper2);
  border-radius:10px;
  padding:10px 20px 10px;
  cursor:pointer;
  transition:all .25s;
  border:1px solid var(--paper3);
  position:relative;
  overflow:hidden;
  background-size:cover;
  background-position:center;
}
.home-section-card::before {
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(135deg, rgba(242,238,228,.66) 0%, rgba(242,238,228,.5) 100%);
  z-index:0;
}
.home-section-card::after {
  content:'';
  position:absolute;
  bottom:0; left:0; right:0;
  height:3px;
  background:var(--rust);
  transform:scaleX(0);
  transform-origin:left;
  transition:transform .3s ease;
  z-index:2;
}
.record-card {
  background-image:url('images/daily-bg.jpg');
}
.vision-card {
  background-image:url('images/vision-bg.jpg');
}
.home-section-card:hover { box-shadow:0 8px 24px rgba(44,40,35,.1); transform:translateY(-3px); }
.home-section-card:hover::after { transform:scaleX(1); }
.home-section-icon {
  font-size:20px;
  margin-bottom:0;
  display:inline;
  position:relative;
  z-index:1;
}
.home-section-name {
  font-family:'Playfair Display',serif;
  font-size:14px;
  font-weight:800;
  color:var(--ink);
  margin-bottom:2px;
  position:relative;
  z-index:1;
  text-shadow:0 1px 2px rgba(255,255,255,.6);
  display:flex;
  align-items:center;
  gap:7px;
}
.home-section-desc {
  font-size:11px;
  color:rgba(44,40,35,.75);
  font-family:'Pretendard',sans-serif;
  line-height:1.4;
  margin-bottom:6px;
  position:relative;
  z-index:1;
}
.home-section-count {
  font-family: 'Pretendard', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--rust);
  letter-spacing: .02em;
  line-height: 1;
  position: relative;
  z-index: 1;
  background: rgba(181,106,76,.12);
  border: 1px solid rgba(181,106,76,.22);
  border-radius: 20px;
  padding: 2px 8px;
  text-shadow: none;
  margin-left: 2px;
}
.home-section-arrow {
  position:absolute;
  top:50%; right:18px;
  transform:translateY(-50%);
  color:var(--paper3);
  font-size:16px;
  transition:color .25s, transform .25s;
  z-index:1;
}
.home-section-card:hover .home-section-arrow { color:var(--rust); transform:translateY(-50%) translateX(4px); }

/* 홈 Latest Posts — 타일 카드 */
.home-recent { margin-bottom:48px; }
.home-section-header {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  margin-bottom:24px;
  padding-bottom:16px;
  border-bottom:1px solid var(--paper3);
}
.home-section-heading {
  font-family:'Playfair Display',serif;
  font-size:20px;
  font-weight:700;
  color:var(--ink);
}
.home-section-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink2);
  font-family: 'Pretendard', sans-serif;
  letter-spacing: .07em;
  background: none;
  border: 1px solid var(--paper3);
  border-radius: 20px;
  cursor: pointer;
  padding: 5px 13px 5px 14px;
  transition: all .2s ease;
  text-transform: uppercase;
}
.home-section-more svg {
  transition: transform .2s ease;
  flex-shrink: 0;
}
.home-section-more:hover {
  color: var(--rust);
  border-color: var(--rust-l);
  background: rgba(181,106,76,.06);
}
.home-section-more:hover svg { transform: translateX(3px); }

/* ═══════════════════════════════════════════════
   HOME LATEST POSTS — 고정 높이 2열 그리드
   ═══════════════════════════════════════════════ */

/* Latest Posts — 2열 grid, gutter 24px */
.home-latest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* 카드 공통: 고정 높이 380px, 모든 카드 동일 */
.home-latest-card {
  height: 380px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 14px rgba(44,40,35,.09);
  transition: transform .25s ease, box-shadow .25s ease;
  opacity: 0;
  animation: hlFadeUp .5s ease forwards;
}
.home-latest-card:nth-child(1) { animation-delay: .05s; }
.home-latest-card:nth-child(2) { animation-delay: .13s; }
.home-latest-card:nth-child(3) { animation-delay: .21s; }
.home-latest-card:nth-child(4) { animation-delay: .29s; }
.home-latest-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(44,40,35,.16);
}
@keyframes hlFadeUp {
  from { opacity:0; transform:translateY(16px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ── [시선과 머무름] Full Background Image 카드 ── */
.home-latest-card.vision-type {
  border: none;
}
/* 이미지: 카드 전체를 꽉 채움 */
.home-latest-card.vision-type .home-latest-img {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.home-latest-card.vision-type .home-latest-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}
.home-latest-card.vision-type:hover .home-latest-img img { transform: scale(1.05); }
/* 이미지 없을 때 폴백 */
.home-latest-card.vision-type .home-latest-no-img-vision {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #2a2723, #1a1612);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  opacity: .3;
}
/* 텍스트 오버레이: 하단 그라데이션 위 */
.home-latest-card.vision-type .home-latest-body {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(
    to top,
    rgba(20,15,10,.85) 0%,
    rgba(20,15,10,.45) 40%,
    transparent 70%
  );
}
.home-latest-card.vision-type .home-latest-body-inner {
  padding: 24px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.home-latest-card.vision-type .home-latest-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rust-l);
  font-family: 'Pretendard', sans-serif;
}
.home-latest-card.vision-type .home-latest-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 15px;
  font-weight: 400;
  color: rgba(249,247,242,.92);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s;
}
.home-latest-card.vision-type:hover .home-latest-title { color: #fff; }
.home-latest-card.vision-type .home-latest-date {
  font-size: 10px;
  color: rgba(249,247,242,.42);
  font-family: 'Pretendard', sans-serif;
}
.home-latest-card.vision-type:hover {
  box-shadow: 0 12px 36px rgba(0,0,0,.28);
}

/* ── [일상의 기록] 상단 썸네일 + 하단 텍스트 카드 ── */
.home-latest-card.record-type {
  background: #f8f5ee;
  background-image: linear-gradient(160deg, #faf7f0 0%, #f2ece0 100%);
  border: 1px solid rgba(197,186,170,.5);
  box-shadow: 0 2px 14px rgba(44,40,35,.08), inset 0 1px 0 rgba(255,255,255,.7);
}
/* 상단 카테고리 컬러 바 */
.home-latest-card.record-type .hl-record-bar {
  height: 4px;
  width: 100%;
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--rust), var(--rust-l));
}
.home-latest-card.record-type.no-img-travel .hl-record-bar { background: linear-gradient(90deg,#7aaed0,#b8d4ea); }
.home-latest-card.record-type.no-img-food   .hl-record-bar { background: linear-gradient(90deg,#c8986a,#e8c898); }
.home-latest-card.record-type.no-img-think  .hl-record-bar { background: linear-gradient(90deg,#9a8cc0,#c8bce0); }
.home-latest-card.record-type.no-img-etc    .hl-record-bar { background: linear-gradient(90deg,#7ab07a,#b0d0b0); }

/* 썸네일 영역: 카드 높이에서 텍스트 영역(156px)을 뺀 나머지 = 220px */
.home-latest-card.record-type .home-latest-img {
  width: 100%;
  height: 220px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--paper3);
  position: relative;
}
.home-latest-card.record-type .home-latest-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease, opacity .4s;
  opacity: .85;
  filter: saturate(.88);
}
.home-latest-card.record-type:hover .home-latest-img img {
  transform: scale(1.05);
  opacity: .95;
}
/* 이미지 없을 때 — 그라데이션 플레이스홀더 */
.home-latest-card.record-type .record-no-img-bg {
  width: 100%;
  height: 220px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  opacity: .25;
}
.home-latest-card.record-type.no-img-daily  .record-no-img-bg { background: linear-gradient(135deg,#e8ddd0,#c8b090); }
.home-latest-card.record-type.no-img-travel .record-no-img-bg { background: linear-gradient(135deg,#c8d8e8,#8faec8); }
.home-latest-card.record-type.no-img-food   .record-no-img-bg { background: linear-gradient(135deg,#e8d8c0,#c0a888); }
.home-latest-card.record-type.no-img-think  .record-no-img-bg { background: linear-gradient(135deg,#d8d0e0,#b0a4c0); }
.home-latest-card.record-type.no-img-etc    .record-no-img-bg { background: linear-gradient(135deg,#d0e0d0,#a0c0a0); }

/* 텍스트 본문 영역: flex:1로 나머지 높이 채움 */
.home-latest-card.record-type .home-latest-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 20px 14px;
  position: relative;
  overflow: hidden;
  min-height: 0;
}
/* 우하단 큰따옴표 데코 */
.home-latest-card.record-type .home-latest-body::after {
  content: '\201C';
  position: absolute;
  bottom: -22px; right: 12px;
  font-family: 'Playfair Display', serif;
  font-size: 110px;
  font-weight: 900;
  color: rgba(44,40,35,.05);
  line-height: 1;
  pointer-events: none;
}
.home-latest-card.record-type .home-latest-body-inner {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  min-height: 0;
}
.home-latest-card.record-type .home-latest-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--rust);
  font-family: 'Pretendard', sans-serif;
  flex-shrink: 0;
}
/* 제목: 히어로 배너와 동일한 Playfair Display italic */
.home-latest-card.record-type .home-latest-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  color: var(--ink);
  line-height: 1.38;
  letter-spacing: -.2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-shrink: 0;
  transition: color .2s;
}
.home-latest-card.record-type:hover .home-latest-title { color: var(--rust-d); }
/* 본문 요약: 남은 공간 채움 */
.home-latest-card.record-type .home-latest-excerpt {
  font-size: 12.5px;
  color: var(--ink2);
  font-family: 'Noto Serif KR', serif;
  font-weight: 300;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: .8;
  flex-shrink: 0;
}
.home-latest-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
}
.home-latest-date {
  font-size: 10.5px;
  color: var(--muted);
  font-family: 'Pretendard', sans-serif;
  opacity: .65;
}
.home-latest-card.record-type:hover {
  box-shadow: 0 10px 32px rgba(44,40,35,.14);
  border-color: rgba(181,106,76,.3);
}

/* 공통 태그/제목/날짜 기본값 (카드 밖 혹시 쓰일 경우 대비) */
.home-latest-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rust);
  font-family: 'Pretendard', sans-serif;
}
.home-latest-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.45;
}
.home-latest-no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  opacity: .3;
}

/* 모바일: 1열 */
@media (max-width:680px) {
  .home-latest-grid { grid-template-columns: 1fr; gap: 16px; }
  .home-latest-card { height: 320px; }
  .home-latest-card.record-type .home-latest-img,
  .home-latest-card.record-type .record-no-img-bg { height: 170px; }
  .home-latest-card.record-type .home-latest-title { font-size: 15px; }
}
/* 태블릿: height 완화 */
@media (min-width:681px) and (max-width:900px) {
  .home-latest-card { height: 340px; }
  .home-latest-card.record-type .home-latest-img,
  .home-latest-card.record-type .record-no-img-bg { height: 185px; }
}

/* AI 매일 명언 */
.home-quote {
  background:var(--sidebar-bg);
  border-radius:12px;
  padding:40px 52px;
  text-align:center;
  position:relative;
  overflow:hidden;
  margin-bottom:8px;
  min-height:130px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.home-quote::before {
  content:'\201C';
  font-family:'Playfair Display',serif;
  font-size:200px;
  font-weight:900;
  color:rgba(255,255,255,.04);
  position:absolute;
  top:-30px; left:30px;
  line-height:1;
  pointer-events:none;
}
.home-quote-loading {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  color:rgba(249,247,242,.35);
  font-size:12px;
  font-family:'Pretendard',sans-serif;
  letter-spacing:.06em;
}
.home-quote-spinner {
  width:20px; height:20px;
  border:2px solid rgba(249,247,242,.12);
  border-top-color:var(--rust-l);
  border-radius:50%;
  animation:spin .8s linear infinite;
}
@keyframes spin { to { transform:rotate(360deg); } }
.home-quote-inner { width:100%; position:relative; z-index:1; }
.home-quote-badge {
  font-size:10px;
  letter-spacing:.22em;
  text-transform:uppercase;
  color:var(--rust-l);
  font-family:'Pretendard',sans-serif;
  margin-bottom:18px;
}
.home-quote-text {
  font-family:'Noto Serif KR',serif;
  font-size:17px;
  color:rgba(249,247,242,.82);
  line-height:1.9;
  font-weight:300;
  font-style:italic;
}
.home-quote-author {
  font-size:11px;
  color:var(--rust-l);
  font-family:'Pretendard',sans-serif;
  letter-spacing:.15em;
  text-transform:uppercase;
  margin-top:18px;
  opacity:.8;
}

/* 홈 모바일 */
@media (max-width:680px) {
  .home-hero { min-height:280px; margin-bottom:32px; border-radius:12px; }
  .home-hero-content { padding:24px 26px; }
  .home-hero-deco { font-size:180px; }
  .home-sections { grid-template-columns:1fr; gap:12px; margin-bottom:36px; }
  .home-section-card { padding:22px 20px 18px; }
  .home-quote { padding:28px 24px; }
}
@media (min-width:681px) and (max-width:900px) {
  .home-sections { grid-template-columns:1fr 1fr; }
  /* 태블릿: 캘린더 좌우 비율 조정 — gap을 포함해 넉넉히 계산 */
  .hc-split { flex-wrap:wrap; gap:10px; }
  .hc-left { flex:1 1 calc(56% - 8px); min-width:0; max-width:100%; }
  .hc-right { flex:1 1 calc(44% - 8px); min-width:0; max-width:100%; }
  .home-cal-grid { min-width:0; }
  .hc-cell { min-width:0; }
}
@media (max-width:1100px) {
  .hc-split { flex-wrap:wrap; gap:12px; }
  .hc-left { flex:1 1 calc(56% - 8px); min-width:0; max-width:100%; }
  .hc-right { flex:1 1 calc(44% - 8px); min-width:0; max-width:100%; }
  .home-cal-grid { min-width:0; width:100%; }
  .hc-cell { min-width:0; }
}
/* 모바일 캘린더 세로 전환 — 768px 블록으로 통합됨 */

/* 날짜 길이 반응형 */
.short-date { display:none; }
.full-date  { display:inline; }
@media (max-width:680px) {
  .short-date { display:inline; }
  .full-date  { display:none; }
}

.post-card::before {
  content:'';
  position:absolute;
  left:0;
  top:10px;
  bottom:10px;
  width:3px;
  border-radius:2px;
  background:linear-gradient(to bottom, var(--rust), transparent);
  opacity:0;
  transition:opacity .25s;
}

.post-card:hover::before {
  opacity:.5;
}

@media (max-width:380px) { .vision-grid { grid-template-columns:1fr; } }

/* ══════════════════════════════════════════
   낙서장 (Scratchpad)
══════════════════════════════════════════ */
.scratch-toolbar {
  display:flex; align-items:center; justify-content:space-between; margin-bottom:32px;
}
.scratch-toolbar-title {
  font-family:'Noto Serif KR',serif; font-size:11px; color:var(--muted);
  letter-spacing:.2em; text-transform:uppercase; font-weight:500;
}
.scratch-list { display:flex; flex-direction:column; gap:0; }
.scratch-empty { padding:80px 0; text-align:center; color:var(--muted); font-size:14px; font-family:'Pretendard',sans-serif; }

/* 낙서장 카드 */
.scratch-card {
  display:grid;
  grid-template-columns:44px 1fr auto;
  align-items:flex-start;
  gap:14px;
  padding:20px 6px;
  border-bottom:1px solid var(--paper3);
  transition:background .18s;
  position:relative;
}
.scratch-card:first-child { border-top:1px solid var(--paper3); }
.scratch-card:hover { background:var(--paper2); border-radius:6px; }

/* 아바타 */
.scratch-avatar {
  width:40px; height:40px; border-radius:50%;
  object-fit:cover; flex-shrink:0;
  border:1.5px solid var(--paper3);
  background:var(--paper3);
}
.scratch-avatar-default {
  width:40px; height:40px; border-radius:50%;
  background:var(--paper3); flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  border:1.5px solid var(--paper3);
}

/* 본문 영역 */
.scratch-body { display:flex; flex-direction:column; gap:5px; min-width:0; }
.scratch-author-row {
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
}
.scratch-author {
  font-size:13px; font-weight:700; color:var(--ink);
  font-family:'Pretendard',sans-serif;
}
.scratch-date-inline {
  font-size:11px; color:var(--muted);
  font-family:'Pretendard',sans-serif; opacity:.65;
}
.scratch-title {
  font-size:15px; font-weight:600; color:var(--ink);
  letter-spacing:-.2px; line-height:1.4;
  font-family:'Pretendard',sans-serif;
  transition:color .18s;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.scratch-card:hover .scratch-title { color:var(--rust); }
.scratch-excerpt {
  font-size:12.5px; color:var(--muted);
  font-family:'Pretendard',sans-serif;
  line-height:1.55; opacity:.75;
  display:-webkit-box; -webkit-line-clamp:1;
  -webkit-box-orient:vertical; overflow:hidden;
}
.scratch-thumb {
  width:72px; height:60px; border-radius:6px;
  object-fit:cover; flex-shrink:0;
  border:1px solid var(--paper3);
}

/* 삭제 버튼 */
.scratch-del-btn {
  background: rgba(181,106,76,.07);
  border: 1px solid rgba(181,106,76,.28);
  cursor: pointer;
  color: var(--rust-d);
  font-size: 11.5px;
  font-family: 'Pretendard', sans-serif;
  font-weight: 500;
  letter-spacing: .02em;
  padding: 4px 11px;
  border-radius: 20px;
  transition: all .2s ease;
  flex-shrink: 0;
  margin-top: 2px;
  opacity: .82;
  white-space: nowrap;
}
.scratch-del-btn:hover {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
  opacity: 1;
}

/* 낙서장 이미지 확대 오버레이 */
.scratch-img-overlay {
  position:fixed; inset:0; background:rgba(15,12,10,.93); z-index:2500;
  display:none; align-items:center; justify-content:center; padding:20px;
  cursor:zoom-out;
}
.scratch-img-overlay.active { display:flex; }
.scratch-img-full {
  max-width:100%; max-height:90vh; border-radius:8px;
  object-fit:contain; cursor:default;
  box-shadow:0 8px 40px rgba(0,0,0,.5);
}
.scratch-img-close {
  position:fixed; top:16px; right:22px;
  background:none; border:none; color:#fff;
  font-size:36px; line-height:1; cursor:pointer;
  opacity:.75; z-index:2501; padding:4px 8px;
  transition:opacity .18s;
}
.scratch-img-close:hover { opacity:1; }

/* 낙서장 글쓰기 모달 */
.scratch-modal { position:fixed; inset:0; background:rgba(44,40,35,.82); backdrop-filter:blur(6px); display:none; align-items:center; justify-content:center; padding:20px; z-index:1000; }
.scratch-modal.active { display:flex; }
.scratch-modal-inner {
  background:var(--paper); width:100%; max-width:580px;
  border-radius:8px; position:relative;
  max-height:92vh;
  display:flex; flex-direction:column;
  overflow:hidden;
}
@media (max-width:680px) {
  .scratch-modal { align-items:flex-end; padding:0; }
  .scratch-modal-inner { border-radius:16px 16px 0 0; max-height:88vh; }
  .scratch-card { grid-template-columns:36px 1fr auto; gap:10px; }
  .scratch-avatar, .scratch-avatar-default { width:34px; height:34px; }
  .scratch-title { font-size:13.5px; }
}

/* ══════════════════════════════════════════
   노트북 — 코르크보드 디자인
══════════════════════════════════════════ */

/* 코르크 보드 배경 */
.corkboard-section {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(180,130,70,.2) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(140,100,50,.16) 0%, transparent 50%),
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(100,65,20,.05) 3px, rgba(100,65,20,.05) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(100,65,20,.05) 3px, rgba(100,65,20,.05) 4px);
  background-color: #c49a5c;
  border-radius: 16px;
  padding: 32px 28px 36px;
  box-shadow: inset 0 2px 10px rgba(80,50,20,.3), 0 4px 18px rgba(80,50,20,.18);
  min-height: 240px;
}

/* 툴바 */
.notebook-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
/* 코르크 배경 위에서 항상 선명하게 */
.notebook-toolbar-title {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  color: #fff;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 700;
  margin-right: 4px;
  text-shadow: 0 1px 4px rgba(60,30,0,.6);
}
.notebook-filter-group { display: flex; gap: 7px; flex-wrap: wrap; flex: 1; }

/* 미선택: 반투명 흰 배경 + 진한 갈색 텍스트 → 항상 읽힘 */
.nb-filter-btn {
  background: rgba(255,255,255,.32);
  border: 1.5px solid rgba(255,255,255,.55);
  border-radius: 20px;
  padding: 5px 13px;
  font-size: 12px;
  color: #3a2008;
  font-family: 'Pretendard', sans-serif;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all .2s;
}
/* 선택됨: 완전 흰 배경 + 러스트 텍스트 + 그림자로 명확히 구분 */
.nb-filter-btn.on {
  background: #fff;
  border-color: #fff;
  color: #b56a4c;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.22);
}
.nb-filter-btn:hover:not(.on) { background: rgba(255,255,255,.52); }
.nb-type-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; box-shadow: 0 1px 2px rgba(0,0,0,.2); }

/* 새 노트 버튼 — write-trigger 와 동일 스타일 */
.nb-write-btn {
  background: var(--ink);
  color: var(--white);
  border: none;
  padding: 8px 18px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 12.5px;
  font-family: 'Noto Serif KR', serif;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  transition: background .2s;
}
.nb-write-btn:hover { background: var(--rust); }

/* 모바일 툴바: 타이틀+버튼 / 필터 2행 구조 */
@media (max-width: 680px) {
  .notebook-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "title btn" "filters filters";
    gap: 10px;
    align-items: center;
  }
  .notebook-toolbar-title { grid-area: title; }
  .nb-write-btn           { grid-area: btn; }
  .notebook-filter-group  { grid-area: filters; }
}

/* 빈/로딩 */
.nb-loading, .nb-empty {
  text-align: center;
  padding: 60px 0;
  color: rgba(255,255,255,.7);
  font-size: 14px;
  font-family: 'Pretendard', sans-serif;
  grid-column: 1/-1;
  text-shadow: 0 1px 3px rgba(0,0,0,.2);
}

/* 카드 그리드 */
.nb-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 32px;
  overflow: visible;
}

/* 메모지 카드 */
.nb-card {
  position: relative;
  border-radius: 2px;
  padding: 28px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  box-shadow:
    0 4px 6px rgba(0,0,0,.14),
    0 10px 28px rgba(0,0,0,.18),
    inset 0 0 0 1px rgba(0,0,0,.04);
  transition: transform .25s ease, box-shadow .25s ease, z-index 0s;
  transform-origin: top center;
  z-index: 1;
}
.nb-card:hover {
  box-shadow: 0 10px 20px rgba(0,0,0,.2), 0 20px 50px rgba(0,0,0,.22);
  z-index: 4;
}

/* 타입별 종이 색 */
.nb-card.type-memo { background: linear-gradient(150deg,#fff9d2,#fff3aa); }
.nb-card.type-todo { background: linear-gradient(150deg,#eaf5e9,#d4edda); }
.nb-card.type-link { background: linear-gradient(150deg,#e6eeff,#d0e4ff); }

/* 회전 (id % 5 기반) */
.nb-card.rot-0 { transform: rotate(-2.2deg); }
.nb-card.rot-1 { transform: rotate(1.6deg); }
.nb-card.rot-2 { transform: rotate(-0.9deg); }
.nb-card.rot-3 { transform: rotate(2.3deg); }
.nb-card.rot-4 { transform: rotate(-1.6deg); }
.nb-card.rot-0:hover { transform: rotate(-2.2deg) translateY(-7px) scale(1.02); }
.nb-card.rot-1:hover { transform: rotate(1.6deg)  translateY(-7px) scale(1.02); }
.nb-card.rot-2:hover { transform: rotate(-0.9deg) translateY(-7px) scale(1.02); }
.nb-card.rot-3:hover { transform: rotate(2.3deg)  translateY(-7px) scale(1.02); }
.nb-card.rot-4:hover { transform: rotate(-1.6deg) translateY(-7px) scale(1.02); }

/* 핀 */
.nb-card::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff7070, #c0392b);
  box-shadow: 0 2px 6px rgba(0,0,0,.38), inset 0 -1px 2px rgba(0,0,0,.2);
  z-index: 3;
}
.nb-card.type-todo::before { background: radial-gradient(circle at 35% 35%, #81c784, #388e3c); }
.nb-card.type-link::before { background: radial-gradient(circle at 35% 35%, #64b5f6, #1565c0); }

/* 카드 헤더 */
.nb-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nb-card-type {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  font-family: 'Pretendard', sans-serif; padding: 2px 8px; border-radius: 20px;
}
.nb-card-type.memo { background: rgba(181,106,76,.14); color: #8b4513; }
.nb-card-type.todo { background: rgba(56,142,60,.14);  color: #2e7d32; }
.nb-card-type.link { background: rgba(21,101,192,.14); color: #1565c0; }
.nb-card-actions { display: flex; gap: 4px; }
.nb-card-btn {
  background: none; border: none; cursor: pointer; padding: 3px 7px;
  border-radius: 4px; font-size: 11px; color: var(--muted);
  font-family: 'Pretendard', sans-serif; transition: all .18s;
}
.nb-card-btn:hover     { background: rgba(0,0,0,.07); color: var(--ink); }
.nb-card-btn.del:hover { background: rgba(181,106,76,.12); color: var(--rust); }

/* 카드 제목 */
.nb-card-title {
  font-size: 15px; font-weight: 700; color: #3a2810;
  font-family: 'Noto Serif KR', serif; line-height: 1.4; word-break: break-word;
}

/* 카드 본문 미리보기 */
.nb-card-body {
  font-size: 12.5px; color: #5a4030;
  font-family: 'Pretendard', sans-serif;
  line-height: 1.7; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}

/* 할일 */
.nb-todo-list { display: flex; flex-direction: column; gap: 5px; }
.nb-todo-item {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px; color: #4a3a20;
  font-family: 'Pretendard', sans-serif; line-height: 1.5;
}
.nb-todo-item input[type=checkbox] { margin-top: 3px; accent-color: #388e3c; flex-shrink: 0; cursor: pointer; }
.nb-todo-item.done span { text-decoration: line-through; opacity: .45; }
/* 할일 - 체크박스 없는 일반 텍스트 줄 */
.nb-todo-text-line {
  font-size: 12.5px; color: #4a3a20;
  font-family: 'Pretendard', sans-serif; line-height: 1.5;
  padding-left: 2px;
}
/* 체크박스 토글 버튼 (모달 내 할일 타입 전용) */
.nb-checkbox-toggle-btn {
  display: flex;
  align-items: center; gap: 6px;
  background: rgba(56,142,60,.08);
  border: 1px solid rgba(56,142,60,.28);
  border-radius: 20px;
  padding: 4px 11px;
  font-size: 12px; font-family: 'Pretendard', sans-serif;
  font-weight: 600; color: #2e7d32;
  cursor: pointer; transition: all .18s;
  opacity: .45;
  pointer-events: none;
  white-space: nowrap;
}
.nb-checkbox-toggle-btn:hover {
  background: rgba(56,142,60,.18);
  border-color: #388e3c;
}
.nb-checkbox-toggle-btn.visible {
  opacity: 1;
  pointer-events: auto;
}
/* 글자수 카운터 */
.nb-body-counter {
  text-align: right; font-size: 11px;
  color: var(--muted); margin-top: 5px;
  font-family: 'Pretendard', sans-serif;
}
.nb-body-counter.warn { color: var(--rust); font-weight: 600; }

/* 링크 */
.nb-card-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: #1565c0; font-family: 'Pretendard', sans-serif;
  text-decoration: none; word-break: break-all;
  padding: 5px 9px; border-radius: 4px;
  background: rgba(21,101,192,.08); border: 1px solid rgba(21,101,192,.2);
  transition: background .18s;
}
.nb-card-link:hover { background: rgba(21,101,192,.15); }

/* 날짜 */
.nb-card-date { font-size: 11px; color: #8a7050; font-family: 'Pretendard', sans-serif; opacity: .75; text-align: right; }

/* 모달 타입 선택 */
.nb-type-select-row { display: flex; gap: 8px; flex-wrap: wrap; }
.nb-type-radio { cursor: pointer; }
.nb-type-radio input { display: none; }
.nb-type-pill {
  display: inline-block; padding: 6px 14px; border-radius: 20px;
  font-size: 12.5px; font-family: 'Pretendard', sans-serif;
  border: 1.5px solid var(--paper3); color: var(--muted); transition: all .18s; cursor: pointer;
}
.nb-type-radio input:checked + .nb-type-pill.memo { background: rgba(181,106,76,.12); border-color: var(--rust);  color: var(--rust);  font-weight: 600; }
.nb-type-radio input:checked + .nb-type-pill.todo { background: rgba(56,142,60,.12);  border-color: #388e3c; color: #2e7d32; font-weight: 600; }
.nb-type-radio input:checked + .nb-type-pill.link { background: rgba(21,101,192,.12); border-color: #1565c0; color: #1565c0; font-weight: 600; }

/* 상세 모달 */
.nb-detail-modal {
  position: fixed; inset: 0; background: rgba(44,40,35,.82);
  backdrop-filter: blur(6px); display: none;
  align-items: center; justify-content: center; padding: 20px; z-index: 1050;
}
.nb-detail-modal.active { display: flex; animation: fadeIn .22s ease; }
.nb-detail-inner {
  background: var(--paper); width: 100%; max-width: 600px;
  border-radius: 8px; position: relative;
  max-height: 88vh; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.32);
}
.nb-detail-header {
  padding: 22px 28px 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  flex-shrink: 0;
}
.nb-detail-type-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  font-family: 'Pretendard', sans-serif; padding: 3px 10px; border-radius: 20px;
  flex-shrink: 0; margin-top: 4px;
}
.nb-detail-type-badge.memo { background: rgba(181,106,76,.12); color: var(--rust); }
.nb-detail-type-badge.todo { background: rgba(56,142,60,.12);  color: #2e7d32; }
.nb-detail-type-badge.link { background: rgba(21,101,192,.12); color: #1565c0; }
.nb-detail-close {
  cursor: pointer; font-size: 28px; background: none; border: none;
  color: var(--ink); line-height: 1; padding: 4px; flex-shrink: 0; transition: color .2s;
}
.nb-detail-close:hover { color: var(--rust); }
.nb-detail-body { padding: 16px 28px 28px; overflow-y: auto; flex: 1; }
.nb-detail-title {
  font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700;
  color: var(--ink); line-height: 1.35; margin-bottom: 16px; word-break: break-word;
}
.nb-detail-content {
  font-size: 14.5px; color: var(--ink2); font-family: 'Pretendard', sans-serif;
  line-height: 1.9; word-break: break-word; white-space: pre-wrap;
}
.nb-detail-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  font-size: 13px; color: #1565c0; font-family: 'Pretendard', sans-serif;
  text-decoration: none; padding: 8px 14px; border-radius: 6px;
  background: rgba(21,101,192,.07); border: 1px solid rgba(21,101,192,.2);
  word-break: break-all; transition: background .18s;
}
.nb-detail-link:hover { background: rgba(21,101,192,.14); }
.nb-detail-footer {
  padding: 14px 28px 20px; border-top: 1px solid var(--paper3);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.nb-detail-date { font-size: 11.5px; color: var(--muted); font-family: 'Pretendard', sans-serif; }
.nb-detail-actions { display: flex; gap: 8px; }
.nb-detail-btn {
  background: none; border: 1px solid var(--paper3); padding: 6px 14px;
  border-radius: 4px; cursor: pointer; font-size: 12px;
  font-family: 'Pretendard', sans-serif; color: var(--muted); transition: all .2s;
}
.nb-detail-btn:hover     { border-color: var(--ink2); color: var(--ink); }
.nb-detail-btn.del:hover { background: rgba(181,106,76,.08); border-color: var(--rust); color: var(--rust); }

@media (max-width: 680px) {
  .nb-card-grid { grid-template-columns: 1fr; gap: 28px; }
  .nb-detail-modal  { align-items: flex-end; padding: 0; }
  .nb-detail-inner  { border-radius: 16px 16px 0 0; max-height: 88vh; }
  .nb-detail-header { padding: 18px 20px 0; }
  .nb-detail-body   { padding: 14px 20px 28px; }
  .nb-detail-footer { padding: 12px 20px 28px; }
}

/* 로그인 유도 배너 */
.login-required-banner {
  background:var(--paper2); border:1px solid var(--paper3);
  border-radius:8px; padding:18px 24px;
  display:flex; align-items:center; gap:14px;
  font-family:'Pretendard',sans-serif; font-size:13px; color:var(--muted);
  margin-bottom:20px;
}
.login-required-banner a {
  color:var(--rust); font-weight:600; text-decoration:none;
  white-space:nowrap;
}
.login-required-banner a:hover { text-decoration:underline; }

/* ── 이모지 피커 공통 ─────────────────────── */
.ep-toolbar {
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px 8px;
  background:var(--paper2);
  border:1px solid var(--paper3);
  border-bottom:none;
  border-radius:6px 6px 0 0;
}
.ep-toolbar + textarea,
.ep-toolbar + .nb-checkbox-toggle-btn + textarea {
  border-radius:0 0 6px 6px !important;
  border-top-color:var(--paper3) !important;
}
.ep-btn {
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:var(--white);
  border:1px solid var(--paper3);
  border-radius:20px;
  padding:4px 11px;
  font-size:12px;
  font-family:'Pretendard',sans-serif;
  color:var(--ink2);
  cursor:pointer;
  transition:all .18s ease;
  line-height:1.4;
}
.ep-btn:hover { background:var(--paper3); border-color:var(--rust-l); color:var(--rust); }
.ep-btn.open  { background:var(--rust); border-color:var(--rust); color:#fff; }
.ep-hint {
  font-size:11px;
  color:var(--muted);
  font-family:'Pretendard',sans-serif;
  opacity:.65;
}

/* 피커 드롭다운 */
.ep-picker {
  display:none;
  background:var(--white);
  border:1px solid var(--paper3);
  border-radius:0 0 8px 8px;
  border-top:none;
  padding:10px;
  box-shadow:0 8px 24px rgba(44,40,35,.10);
  position:relative;
  z-index:10;
}
.ep-picker.open { display:block; }
.ep-tabs {
  display:flex;
  gap:4px;
  margin-bottom:8px;
  flex-wrap:wrap;
}
.ep-tab {
  font-size:11px;
  font-family:'Pretendard',sans-serif;
  padding:4px 10px;
  border-radius:20px;
  border:1px solid var(--paper3);
  background:none;
  cursor:pointer;
  color:var(--muted);
  transition:all .15s;
}
.ep-tab.on {
  background:var(--paper2);
  color:var(--ink);
  border-color:var(--paper3);
  font-weight:600;
}
.ep-grid {
  display:flex;
  flex-wrap:wrap;
  gap:3px;
}
.ep-em {
  width:32px;
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  border-radius:6px;
  cursor:pointer;
  border:1px solid transparent;
  transition:background .12s, transform .1s;
  line-height:1;
}
.ep-em:hover {
  background:var(--paper2);
  border-color:var(--paper3);
  transform:scale(1.18);
}

/* ══ 홈 사진+명언 배너 ══════════════════════════ */
.home-photo-banner {
  width:100%; height:200px; border-radius:16px; overflow:hidden;
  position:relative; margin-bottom:14px;
  background:linear-gradient(135deg,#8faec8 0%,#c8b090 55%,#b0a4c0 100%);
}
.home-photo-banner img.hpb-bg {
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; display:block;
  transition:opacity .6s ease;
}
.home-photo-banner .hpb-overlay {
  position:absolute; inset:0;
  background:linear-gradient(to top,rgba(22,16,10,.88) 0%,rgba(22,16,10,.18) 55%,transparent 100%);
}
.hpb-content {
  position:absolute; bottom:0; left:0; right:0; padding:18px 24px;
}
.hpb-badge {
  font-size:8.5px; letter-spacing:.22em; text-transform:uppercase;
  color:rgba(217,155,130,.88); margin-bottom:7px; display:block;
  font-family:'Pretendard',sans-serif;
}
.hpb-quote {
  font-size:14px; color:rgba(249,247,242,.92); line-height:1.75;
  font-style:italic; font-family:'Noto Serif KR',serif; margin-bottom:5px;
}
.hpb-author {
  font-size:9.5px; color:rgba(217,155,130,.75);
  letter-spacing:.1em; font-family:'Pretendard',sans-serif;
}
.hpb-credit {
  position:absolute; top:10px; right:12px;
  font-size:8px; color:rgba(255,255,255,.3);
  font-family:'Pretendard',sans-serif;
}
@media (max-width:680px) {
  .home-photo-banner { height:170px; }
  .hpb-quote { font-size:13px; }
}

/* ══ 감정 선택 오버레이 (로그인 후 필수) ═══════════ */
.mood-select-overlay {
  display:none;
  position:fixed; inset:0; z-index:500;
  background:rgba(22,16,10,.78);
  backdrop-filter:blur(6px);
  align-items:center; justify-content:center;
  padding:20px;
}
.mood-select-overlay.active { display:flex; animation:fadeIn .3s ease; }
.mood-select-card {
  background:var(--paper); border-radius:20px;
  padding:20px 22px 18px; max-width:380px; width:100%;
  text-align:center;
  box-shadow:0 20px 60px rgba(0,0,0,.3);
  position:relative;
  display:flex; flex-direction:column; gap:0;
}
.mood-close-btn {
  position:absolute; top:10px; right:12px;
  background:none; border:none; cursor:pointer;
  font-size:15px; color:var(--muted); line-height:1;
  display:none;
  padding:4px 7px; border-radius:6px; transition:background .15s;
  z-index:1;
}
.mood-close-btn:hover { background:var(--paper3); }
.mood-close-btn.visible { display:block; }

/* 섹션 블록 — 3개 영역 구분 */
.mood-section-block {
  background:var(--paper2);
  border-radius:12px;
  padding:12px 14px;
  margin-bottom:8px;
  text-align:left;
  border:1px solid var(--paper3);
}
.mood-section-block:last-of-type { margin-bottom:12px; }

/* ① 헤더 블록 — X버튼 absolute 기준점 */
.mood-header-block {
  position:relative;
  text-align:center;
  padding:18px 16px 14px;
  background:var(--paper2);
  border-color:var(--rust); border-width:1.5px;
}
.mood-title-badge {
  display:block;
  font-family:'Playfair Display',serif; font-size:19px;
  font-weight:700; color:var(--ink); letter-spacing:.04em;
  margin-bottom:5px;
}
.mood-title-underline {
  display:block; width:40px; height:2px;
  background:var(--rust); border-radius:2px;
  margin:0 auto 7px;
}
.mood-date-auto {
  font-size:11px; color:var(--muted);
  font-family:'Pretendard',sans-serif; letter-spacing:.01em;
}

/* 섹션 레이블 */
.mood-section-label {
  font-size:10px; color:var(--muted); font-family:'Pretendard',sans-serif;
  font-weight:700; margin-bottom:9px;
  letter-spacing:.06em; text-transform:uppercase;
}

/* ② 날씨 자동 표시 */
.mood-weather-auto {
  display:flex; align-items:center; gap:10px;
}
.mood-weather-auto-icon {
  font-size:26px; line-height:1; flex-shrink:0;
}
.mood-weather-auto-comment {
  font-size:12px; color:var(--ink); font-family:'Noto Serif KR',serif;
  line-height:1.55; opacity:.85;
}

/* ③ 감정 선택 */
.mood-select-row {
  display:grid; grid-template-columns:repeat(4,1fr);
  gap:6px; margin-bottom:0;
}
.mood-pick-item {
  display:flex; flex-direction:column; align-items:center; gap:4px;
  cursor:pointer; padding:7px 5px; border-radius:10px;
  transition:background .15s, border-color .15s, transform .15s;
  border:2px solid transparent;
  background:var(--paper);
}
.mood-pick-item:hover { background:var(--paper3); border-color:var(--paper3); transform:scale(1.06); }
.mood-pick-item.selected { border-color:var(--rust); background:rgba(181,106,76,.1); transform:scale(1.06); }
.mood-pick-item svg { width:32px; height:32px; display:block; }
.mood-pick-item[data-sym="em-joy"] svg { fill: #FFD580; }
.mood-pick-item[data-sym="em-thrill"] svg { fill: #FFB3C6; }
.mood-pick-item[data-sym="em-calm"] svg { fill: #A8D8A8; }
.mood-pick-item[data-sym="em-sad"] svg { fill: #A8CDE8; }
.mood-pick-item[data-sym="em-angry"] svg { fill: #FF8A80; }
.mood-pick-item[data-sym="em-lively"] svg { fill: #AEEFD0; }
.mood-pick-item[data-sym="em-tired"] svg { fill: #C0C0C0; }
.mood-pick-lbl { font-size:9px; color:var(--muted); font-weight:600; font-family:'Pretendard',sans-serif; }

/* ④ 한줄 입력 */
.mood-body-wrap { margin-bottom:0; }
.mood-body-input {
  width:100%; border:1.5px solid var(--paper3); border-radius:8px;
  padding:10px 12px; font-size:12.5px; font-family:'Noto Serif KR',serif;
  color:var(--ink); background:var(--paper); resize:none;
  transition:border-color .2s;
  line-height:1.65; display:block; box-sizing:border-box;
}
.mood-body-input:focus { outline:none; border-color:var(--rust); }
.mood-body-input::placeholder { color:var(--muted); opacity:.65; }
.mood-body-input.input-error { border-color:#FF8A80; }
.mood-char-count {
  font-size:10px; color:var(--muted); font-family:'Pretendard',sans-serif;
  text-align:right; margin-top:5px; transition:color .2s;
}
.mood-char-count.ready { color:#A8D8A8; font-weight:600; }

/* 제출 버튼 */
.mood-submit-btn {
  width:100%; padding:11px; background:var(--ink); color:#fff;
  border:none; border-radius:10px; cursor:pointer; font-size:13px;
  font-family:'Noto Serif KR',serif; font-weight:500;
  transition:background .2s; margin-bottom:8px;
}
.mood-submit-btn:hover { background:var(--rust); }
.mood-submit-btn:disabled { background:var(--paper3); color:var(--muted); cursor:not-allowed; }
.mood-no-skip { font-size:10px; color:var(--rust); font-family:'Pretendard',sans-serif; min-height:14px; text-align:center; }
/* 추가 기록 버튼 */
.hc-today-btns { margin-top:10px; }
.hc-add-log-btn {
  width:100%; padding:10px; background:var(--rust);
  color:#fff; border:none;
  border-radius:9px; cursor:pointer; font-size:12px;
  font-family:'Pretendard',sans-serif; font-weight:700;
  letter-spacing:.05em; transition:background .2s;
}
.hc-add-log-btn:hover { background:var(--rust-d); }

/* ══ 감정 캘린더 — 2분할 레이아웃 ══════════════════ */

/* 전체 래퍼 */
.home-cal-wrap {
  background:var(--white); border-radius:16px;
  border:1px solid var(--paper3); padding:18px;
  margin-bottom:14px; position:relative;
}

/* 2분할 컨테이너 — stretch로 좌우 높이 동일 */
.hc-split {
  display:flex; gap:16px; align-items:stretch;
  flex-direction:row-reverse;
  flex-wrap:wrap;
}

/* 좌측: 캘린더 — 전체의 0.6 */
.hc-left {
  flex:0 0 60%; min-width:0; display:flex; flex-direction:column;
}

/* 우측: 패널 — 나머지 0.4 */
.hc-right {
  flex:1; display:flex; flex-direction:column; gap:10px; min-width:0;
}

/* 헤더 (월 + 세그먼트 네비) */
.home-cal-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.home-cal-month { font-size:15px; font-weight:700; color:var(--ink); font-family:'Playfair Display',serif; }

/* 세그먼트 그룹: ‹ | 3월 이야기 | › */
.hc-seg-group {
  display:flex; flex-direction:row; align-items:center;
  height:36px; box-sizing:border-box;
  border:1.5px solid rgba(181,106,76,.45);
  border-radius:18px; overflow:hidden;
  background:var(--paper2);
}
.hc-seg-arrow {
  -webkit-appearance:none; appearance:none;
  display:flex; flex-direction:row; align-items:center; justify-content:center;
  width:36px; min-width:36px; height:36px;
  padding:0; margin:0; box-sizing:border-box;
  font-size:17px; line-height:1;
  color:var(--muted); background:transparent;
  border:none; outline:none; cursor:pointer; flex-shrink:0;
  transition:background .15s, color .15s;
}
.hc-seg-arrow:hover { background:rgba(181,106,76,.12); color:var(--rust); }
.hc-seg-div { width:1px; height:20px; background:rgba(181,106,76,.35); flex-shrink:0; }
.hc-seg-mid {
  -webkit-appearance:none; appearance:none;
  display:flex; flex-direction:row; align-items:center; justify-content:center;
  height:36px; min-width:90px; padding:0 15px;
  margin:0; box-sizing:border-box;
  font-size:11.5px; font-weight:700; color:var(--rust);
  font-family:'Pretendard',sans-serif; letter-spacing:.03em;
  background:transparent; border:none; outline:none;
  cursor:pointer; white-space:nowrap;
  transition:background .15s;
}
.hc-seg-mid:hover { background:rgba(181,106,76,.1); }

/* 범례 */
.home-cal-legend { display:flex; gap:6px; margin-bottom:8px; align-items:center; flex-wrap:wrap; }
.hcl-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.hcl-dot.joy      { background:#FFD580; }
.hcl-dot.thrill   { background:#FFB3C6; }
.hcl-dot.calm     { background:#A8D8A8; }
.hcl-dot.sad      { background:#A8CDE8; }
.hcl-dot.angry    { background:#FF8A80; }
.hcl-dot.lively   { background:#AEEFD0; }
.hcl-dot.tired    { background:#C0C0C0; }
.hcl-txt { font-size:11px; color:var(--muted); font-family:'Pretendard',sans-serif; font-weight:500; }
.hcl-sep { width:1px; height:9px; background:var(--paper3); margin:0 1px; }
.hcl-q { width:10px; height:10px; border-radius:50%; border:1px dashed #c8b8a0; display:flex; align-items:center; justify-content:center; font-size:7px; color:#c0b0a0; font-weight:700; }

/* 요일 헤더 */
.home-cal-dow-row { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; margin-bottom:2px; }
.home-cal-dow { text-align:center; font-size:10px; font-weight:700; color:var(--muted); letter-spacing:.02em; padding:2px 0; font-family:'Pretendard',sans-serif; }
.home-cal-dow:first-child { color:#c97a7a; }
.home-cal-dow:last-child  { color:#7a9ac9; }

/* 날짜 셀 — 동일한 행 높이 유지 */
.home-cal-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); grid-auto-rows:100px; gap:3px; min-width:0; width:100%; align-items:stretch; }
.hc-cell {
  min-width:0;
  height:100%;
  aspect-ratio:auto;
  border-radius:8px; display:flex; flex-direction:column;
  align-items:center; justify-content:flex-start;
  padding:4px 2px 2px; position:relative; cursor:pointer;
  gap:3px;
  transition:transform .15s ease;
}
.hc-cell:hover:not(.hc-empty):not(.hc-blank) { transform:scale(1.1); z-index:3; }
.hc-cell.hc-empty { background:transparent; cursor:default; }
.hc-cell.hc-blank { background:var(--paper2); }
.hc-cell.hc-blank:hover, .hc-cell.hc-empty:hover { transform:none; cursor:default; }

.hc-num { font-size:12px; font-weight:700; color:var(--ink); line-height:1; }
.hc-cell.hc-today .hc-num {
  background:var(--ink); color:var(--paper);
  width:19px; height:19px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; font-size:10px;
}
.hc-cell.hc-blank .hc-num { color:#c8b8a0; }
.hc-cell.hc-today { border:2px solid var(--ink) !important; }

/* 과거~오늘 공통 테두리 기본값 (감정 클래스 없는 경우 보장) */
.hc-cell.hc-past { border:1px solid rgba(180,168,152,.45); }

/* 감정별 배경 — 새 8종 체계 (과거 기록 있는 날: 선명하게) */
.hc-cell.hc-joy       { background:#FFF3C4; border:1px solid #FFD580; }
.hc-cell.hc-thrill    { background:#FFE0EC; border:1px solid #FFB3C6; }
.hc-cell.hc-calm      { background:#D8F0D8; border:1px solid #A8D8A8; }
.hc-cell.hc-sad       { background:#D4E8F8; border:1px solid #A8CDE8; }
.hc-cell.hc-angry     { background:#FFD8D4; border:1px solid #FF8A80; }
.hc-cell.hc-lively   { background:#D4F7EC; border:1px solid #AEEFD0; }
.hc-cell.hc-tired     { background:#E0E0E0; border:1px solid #C0C0C0; }

/* 날씨 셀 (미래 날씨 있음) — 배경 투명 + 테두리 */
.hc-cell.hc-sunny { background:transparent; border:1.5px solid rgba(255,208,80,.55); }
.hc-cell.hc-cloud { background:transparent; border:1.5px solid rgba(180,180,180,.45); }
.hc-cell.hc-rain  { background:transparent; border:1.5px solid rgba(100,180,240,.5); }
.hc-cell.hc-cold  { background:transparent; border:1.5px solid rgba(140,200,240,.5); }
.hc-cell.hc-sunny .hc-num, .hc-cell.hc-cloud .hc-num,
.hc-cell.hc-rain .hc-num,  .hc-cell.hc-cold .hc-num { color:var(--ink2); }

/* 미래 날씨 아이콘 크게 + 텍스트 가독성 */
.hc-cell.hc-sunny .hc-weather-icon svg,
.hc-cell.hc-cloud .hc-weather-icon svg,
.hc-cell.hc-rain  .hc-weather-icon svg,
.hc-cell.hc-cold  .hc-weather-icon svg { width:26px; height:26px; filter:drop-shadow(0 1px 2px rgba(0,0,0,.15)); }
.hc-cell.hc-sunny .hc-weather-txt,
.hc-cell.hc-cloud .hc-weather-txt,
.hc-cell.hc-rain  .hc-weather-txt,
.hc-cell.hc-cold  .hc-weather-txt { color:var(--ink); font-weight:700; font-size:10px; }

/* ── 날씨 아이콘 호버 애니메이션 ─────────────── */
@keyframes wt-rotate-sun {
  from { transform:rotate(0deg); }
  to   { transform:rotate(360deg); }
}
@keyframes wt-drift {
  0%,100% { transform:translate(0,0); }
  50%     { transform:translate(-2px,-3px); }
}
@keyframes wt-rain-fall {
  0%   { transform:translateY(-10px); opacity:0; }
  30%  { opacity:1; }
  100% { transform:translateY(12px);  opacity:0; }
}
@keyframes wt-rain-drop {
  0%   { transform:translateY(-5px); opacity:0; }
  50%  { opacity:1; }
  100% { transform:translateY(10px); opacity:0; }
}
@keyframes wt-thunder {
  0%,10%,100% { opacity:1; filter:drop-shadow(0 0 5px #FACC15); }
  5%          { opacity:0.1; filter:none; }
  8%          { opacity:1;   filter:drop-shadow(0 0 15px #FACC15); }
}
@keyframes wt-snow {
  0%,100% { transform:translate(0,0); opacity:0.8; }
  50%     { transform:translate(3px,5px); opacity:1; }
}

/* 호버 트리거 */
.hc-cell:hover .sun-rays   { animation:wt-rotate-sun 8s linear infinite; transform-origin:32px 32px; }
.hc-cell:hover .cloud-anim { animation:wt-drift 4s ease-in-out infinite; }
.hc-cell:hover .shower-anim{ animation:wt-rain-fall 0.6s linear infinite; }
.hc-cell:hover .rain-anim  { animation:wt-rain-drop 1s ease-in-out infinite; }
.hc-cell:hover .bolt-anim  { animation:wt-thunder 1.5s infinite; }
.hc-cell:hover .snow-anim  { animation:wt-snow 2.5s ease-in-out infinite; }

/* 미래 날씨 없는 날 — 투명 + 테두리만 */
.hc-cell.hc-future-blank { background:transparent; border:1px solid rgba(200,188,170,.35); }
.hc-cell.hc-future-blank .hc-num { color:#c8b8a0; }
.hc-cell.hc-future-blank:hover { transform:none; cursor:default; }

/* 과거 감정 없는 날 — 연한 베이지 파스텔 */
.hc-cell.hc-no-mood { background:#f7f3ee; border:1px solid #e8e0d4; }

/* 셀 아이콘 */
.hc-icon { width:30px; height:30px; display:block; }
/* 감정 아이콘 컬러 — 캘린더 셀 */
.hc-cell.hc-joy      .hc-icon { fill:#FFD580; }
.hc-cell.hc-thrill   .hc-icon { fill:#FFB3C6; }
.hc-cell.hc-calm     .hc-icon { fill:#A8D8A8; }
.hc-cell.hc-sad      .hc-icon { fill:#A8CDE8; }
.hc-cell.hc-angry    .hc-icon { fill:#FF8A80; }
.hc-cell.hc-lively   .hc-icon { fill:#AEEFD0; }
.hc-cell.hc-tired    .hc-icon { fill:#C0C0C0; }

/* 호버 감정명 툴팁 레이블 */
.hc-mood-label {
  display:none; position:absolute; bottom:calc(100% + 5px); left:50%;
  transform:translateX(-50%);
  background:var(--ink); color:#fff;
  font-size:10px; font-weight:600; font-family:'Pretendard',sans-serif;
  padding:3px 7px; border-radius:5px; white-space:nowrap;
  pointer-events:none; z-index:50;
}
.hc-mood-label::after {
  content:''; position:absolute; top:100%; left:50%;
  transform:translateX(-50%);
  border:4px solid transparent; border-top-color:var(--ink);
}
.hc-cell:hover .hc-mood-label { display:block; }
@keyframes hcWobble {
  0%{transform:rotate(0) scale(1);}20%{transform:rotate(-13deg) scale(1.2);}
  45%{transform:rotate(10deg) scale(1.22);}65%{transform:rotate(-7deg) scale(1.15);}
  85%{transform:rotate(4deg) scale(1.08);}100%{transform:rotate(0) scale(1);}
}
@keyframes hcPulse { 0%,100%{transform:scale(1);}50%{transform:scale(1.1);} }
@keyframes hcFloat { 0%,100%{transform:translateY(0);}50%{transform:translateY(-2px);} }

/* ? 원형 */
.hc-q-circle {
  width:24px; height:24px; border-radius:50%;
  border:1.5px dashed #d0c8bc;
  display:flex; align-items:center; justify-content:center;
  font-size:11px; color:#c0b0a0; font-weight:700;
  background:rgba(200,184,160,.08);
}

/* 날씨 (미래) */
.hc-weather { display:flex; flex-direction:column; align-items:center; gap:1px; }
.hc-weather-icon { line-height:1; display:flex; align-items:center; justify-content:center; }
.hc-weather-icon svg { width:16px; height:16px; display:block; }
.hc-weather-txt {
  font-size:9px; color:var(--ink); line-height:1.25;
  text-align:center; font-family:'Pretendard',sans-serif;
  font-weight:600; white-space:pre-line;
}

/* 글 있음 연필 */
.hc-pencil {
  position:absolute; bottom:2px; right:2px;
  width:10px; height:10px; cursor:pointer; opacity:.55;
  transition:opacity .15s, transform .15s;
}
.hc-pencil:hover { opacity:1; transform:scale(1.3); }

/* 글 팝업 */
.hc-popup {
  display:none; position:absolute; z-index:200;
  background:var(--white); border:1px solid var(--paper3);
  border-radius:9px; padding:6px 0; min-width:155px;
  box-shadow:0 8px 20px rgba(44,40,35,.13);
  top:calc(100% + 4px); left:50%; transform:translateX(-50%);
}
.hc-popup.show { display:block; }
.hc-popup-date { font-size:8.5px; color:var(--muted); padding:0 10px 4px; border-bottom:1px solid var(--paper2); margin-bottom:3px; font-family:'Pretendard',sans-serif; }
.hc-popup-item { display:flex; align-items:center; gap:6px; padding:4px 10px; cursor:pointer; transition:background .12s; }
.hc-popup-item:hover { background:var(--paper2); }
.hc-popup-sec { font-size:8.5px; color:var(--muted); flex-shrink:0; font-family:'Pretendard',sans-serif; }
.hc-popup-title { font-size:10.5px; color:var(--ink); font-weight:600; flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-family:'Pretendard',sans-serif; }

/* ── 날짜별 Today Log 조회 팝업 모달 ── */
.daylog-overlay {
  display:none; position:fixed; inset:0; z-index:600;
  background:rgba(22,16,10,.6); backdrop-filter:blur(4px);
  align-items:flex-end; justify-content:center; padding:0;
}
.daylog-overlay.active { display:flex; animation:fadeIn .25s ease; }
@media(min-width:600px){
  .daylog-overlay { align-items:center; padding:20px; }
}
.daylog-sheet {
  background:var(--paper); width:100%; max-width:480px;
  border-radius:20px 20px 0 0; padding:0 0 env(safe-area-inset-bottom,0);
  max-height:82dvh; display:flex; flex-direction:column;
  box-shadow:0 -8px 40px rgba(0,0,0,.18);
  overflow:hidden;
}
@media(min-width:600px){
  .daylog-sheet { border-radius:20px; max-height:80dvh; }
}
/* 드래그 핸들 (모바일) */
.daylog-handle {
  width:36px; height:4px; background:var(--paper3);
  border-radius:2px; margin:12px auto 0; flex-shrink:0;
}
@media(min-width:600px){ .daylog-handle { display:none; } }
/* 헤더 */
.daylog-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px 10px; border-bottom:1px solid var(--paper3);
  flex-shrink:0;
}
.daylog-title {
  font-family:'Playfair Display',serif; font-size:15px;
  font-weight:700; color:var(--ink);
}
.daylog-close-btn {
  background:none; border:none; cursor:pointer;
  font-size:18px; color:var(--muted); line-height:1;
  padding:4px 6px; border-radius:6px; transition:background .15s;
}
.daylog-close-btn:hover { background:var(--paper2); }
/* 스크롤 영역 */
.daylog-body {
  flex:1; overflow-y:auto; padding:12px 16px;
  -webkit-overflow-scrolling:touch;
}
/* 개별 로그 항목 */
.daylog-item {
  display:flex; gap:10px; align-items:flex-start;
  padding:10px 12px; border-radius:10px;
  background:var(--white); border:1px solid var(--paper3);
  margin-bottom:8px; transition:box-shadow .15s;
}
.daylog-item:last-child { margin-bottom:0; }
.daylog-item-icon { flex-shrink:0; }
.daylog-item-icon svg { width:32px; height:32px; display:block; }
.daylog-item-content { flex:1; min-width:0; }
.daylog-item-top {
  display:flex; align-items:center; justify-content:space-between;
  gap:8px; margin-bottom:3px;
}
.daylog-item-mood {
  font-size:12px; font-weight:700; color:var(--ink);
  font-family:'Pretendard',sans-serif;
}
.daylog-item-time {
  font-size:10.5px; color:var(--muted);
  font-family:'Pretendard',sans-serif; flex-shrink:0;
}
.daylog-item-body {
  font-size:13px; color:var(--ink); line-height:1.75;
  font-family:'Noto Serif KR',serif; font-weight:400;
  white-space:pre-wrap; word-break:break-all;
}
.daylog-item-empty-body {
  font-size:11px; color:var(--muted); font-style:italic;
  font-family:'Pretendard',sans-serif; opacity:.6;
}
.daylog-del-btn {
  background:none; border:1px solid rgba(181,106,76,.25);
  color:var(--muted); border-radius:6px; cursor:pointer;
  font-size:10px; padding:2px 7px; flex-shrink:0;
  font-family:'Pretendard',sans-serif; transition:all .15s;
}
.daylog-del-btn:hover { background:rgba(192,57,43,.08); border-color:#c0392b; color:#c0392b; }
/* 빈 상태 */
.daylog-empty {
  padding:36px 0; text-align:center;
  color:var(--muted); font-size:13px;
  font-family:'Pretendard',sans-serif;
}
.daylog-empty svg { opacity:.25; margin-bottom:10px; }
/* 푸터 버튼 영역 */
.daylog-footer {
  padding:10px 16px 14px; border-top:1px solid var(--paper3);
  flex-shrink:0;
}
.daylog-add-btn {
  width:100%; padding:10px; background:var(--rust); color:#fff;
  border:none; border-radius:10px; cursor:pointer; font-size:13px;
  font-family:'Noto Serif KR',serif; font-weight:500;
  transition:background .2s;
}
.daylog-add-btn:hover { background:var(--rust-d); }
/* 로딩 상태 */
.daylog-loading {
  padding:36px 0; text-align:center;
  color:var(--muted); font-size:12px;
  font-family:'Pretendard',sans-serif;
}

/* ── 우측 패널 ── */

/* ══ Today's Mood 카드 — 3행 흰 박스 디자인 ══ */
.hc-today-card {
  background:#ede8df; border-radius:14px;
  border:1px solid #ddd7cc; padding:14px;
  flex-shrink:0;
}
.hc-today-card-label {
  font-size:10px; font-weight:600; letter-spacing:.14em; text-transform:uppercase;
  color:var(--rust); margin-bottom:10px; font-family:'Pretendard',sans-serif;
}
/* 3행 컨테이너 */
.hct-rows { display:flex; flex-direction:column; gap:7px; }
/* 각 행 — 흰 배경 라운드 박스 */
.hct-row {
  display:flex; align-items:center; gap:10px;
  padding:9px 11px; border-radius:10px;
  background:#ffffff; border:1px solid #ede8df;
}
/* 아이콘 래퍼 */
.hct-icon {
  width:32px; height:32px; border-radius:8px;
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0; font-size:18px;
}
.hct-icon-em { background:rgba(200,190,175,.18); }
.hct-icon-em svg { width:22px; height:22px; display:block; animation:hcPulse 2.8s ease infinite; }
/* Today's Mood 카드 감정 아이콘 — 감정별 컬러 */
.hct-icon-em[data-sym="em-joy"]       svg { fill:#FFD580; }
.hct-icon-em[data-sym="em-thrill"]    svg { fill:#FFB3C6; }
.hct-icon-em[data-sym="em-calm"]      svg { fill:#A8D8A8; }
.hct-icon-em[data-sym="em-sad"]       svg { fill:#A8CDE8; }
.hct-icon-em[data-sym="em-angry"]     svg { fill:#FF8A80; }
.hct-icon-em[data-sym="em-lively"] svg { fill:#AEEFD0; }
.hct-icon-em[data-sym="em-tired"]     svg { fill:#C0C0C0; }
.hct-icon-wt { background:rgba(135,195,232,.28); }
.hct-icon-ht { background:rgba(255,150,150,.22); }
/* 텍스트 */
.hct-text { flex:1; min-width:0; }
.hct-meta { font-size:9.5px; font-weight:600; letter-spacing:.05em; margin-bottom:2px; font-family:'Pretendard',sans-serif; }
.hct-meta-em { color:#a07800; }
.hct-meta-wt { color:#2278a8; }
.hct-meta-ht { color:#b04848; }
.hct-main { font-size:13px; color:var(--ink); font-weight:500; line-height:1.38; font-family:'Pretendard',sans-serif; }
.hct-main.serif { font-family:'Playfair Display',serif; font-size:14px; font-weight:700; }
.hct-main.body-txt {
  font-family:'Pretendard',sans-serif; font-weight:500; font-size:13px;
  color:var(--ink); line-height:1.38;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  cursor:default;
}
/* 날씨 이모지 */
.hct-wt-emoji { line-height:1; display:flex; align-items:center; justify-content:center; }
/* 숨김용 — 날짜 레이블 (JS 호환) */
.hc-today-label { display:none; }
/* 기존 호환 — 날씨 텍스트 노출용 */
#hc-today-wt { display:none; }

/* 지난 7일 통합 카드 (그래프 + 서사) */
.hc-weekly-card {
  background:var(--paper2); border-radius:12px;
  border:1px solid var(--paper3); padding:13px 15px;
  display:flex; flex-direction:column; min-height:0;
}
.hc-weekly-label {
  font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  color:var(--muted); margin-bottom:12px; font-family:'Pretendard',sans-serif;
  display:flex; align-items:center; justify-content:space-between;
}
.hc-weekly-badge {
  font-size:9px; background:rgba(181,106,76,.12); color:var(--rust);
  border-radius:4px; padding:2px 7px; font-weight:700;
  font-family:'Pretendard',sans-serif; letter-spacing:0;
}
.hc-graph-svg { width:100%; overflow:hidden; display:block; background:var(--paper); border-radius:8px; padding:10px; }
.hc-weekly-divider {
  border:none; border-top:1px dashed var(--paper3); margin:10px 0;
}
.hc-narrative-summary-wrap {
  display:flex; flex-direction:column; gap:8px;
}
.hc-narrative-txt {
  font-size:12px; color:var(--ink); line-height:1.85;
  font-family:'Pretendard',sans-serif;
  font-weight:500; background:var(--paper3); padding:12px; border-radius:8px;
}
.hc-narrative-more-btn {
  align-self:flex-end; background:none; border:1px solid var(--rust);
  color:var(--rust); font-size:11px; font-family:'Pretendard',sans-serif;
  font-weight:600; padding:4px 12px; border-radius:20px; cursor:pointer;
  letter-spacing:.04em; transition:background .15s, color .15s;
}
.hc-narrative-more-btn:hover {
  background:var(--rust); color:#fff;
}
.hc-narrative-dots {
  display:none;
}
.hc-narrative-dot-item {
  display:flex; align-items:center; gap:3px;
  font-size:11px; color:var(--muted); font-family:'Pretendard',sans-serif;
}
/* 감정 서사 모달 */
.hc-narrative-modal-overlay {
  display:none; position:fixed; inset:0; background:rgba(0,0,0,.45);
  z-index:9000; align-items:center; justify-content:center; padding:20px;
}
.hc-narrative-modal-overlay.active { display:flex; }
.hc-narrative-modal {
  background:#fdf8f2; border-radius:16px; width:100%; max-width:420px;
  max-height:80vh; display:flex; flex-direction:column;
  box-shadow:0 8px 32px rgba(0,0,0,.22); overflow:hidden;
}
.hc-narrative-modal-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px 12px; border-bottom:1px solid var(--paper3);
  flex-shrink:0;
}
.hc-narrative-modal-title {
  font-size:13px; font-weight:700; color:var(--ink);
  font-family:'Pretendard',sans-serif; display:flex; align-items:center; gap:8px;
}
.hc-narrative-modal-close {
  background:none; border:none; font-size:16px; color:var(--muted);
  cursor:pointer; padding:2px 6px; border-radius:4px; line-height:1;
  transition:color .15s;
}
.hc-narrative-modal-close:hover { color:var(--ink); }
.hc-narrative-modal-body {
  padding:20px 22px; overflow-y:auto;
  font-size:14px; line-height:2;
  color:#3a2e22;
  font-family:'Noto Serif KR', serif;
  font-weight:400;
  /* 노트 줄 배경 */
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent calc(2.4em - 1px),
      rgba(180,160,130,.22) calc(2.4em - 1px),
      rgba(180,160,130,.22) calc(2.4em)
    );
  background-color:#fdf8f2;
  background-attachment:local;
}
.hc-narrative-modal-body p {
  margin:0;
}
.hc-narrative-modal-body strong {
  font-weight:700; color:var(--rust);
}

/* 좌측 하단 그래프/라벨 — 우측 통합카드로 이동했으므로 숨김 */
.hc-week-section { display:none; }
.hc-graph-wrap   { display:none; }
.hc-week-label   { display:none; }

/* 반응형 — 768px 이하 단일 컬럼 */
@media (max-width:768px) {
  .hc-split { flex-direction:column-reverse; gap:12px; }
  .hc-left  { flex:none; width:100%; }
  .hc-right { flex:none; width:100%; }
  .hc-graph-svg { height:auto; }
  .hc-weekly-card { max-height:none; overflow:visible; }
  /* ★ 핵심 수정: min-width:0 으로 aspect-ratio 1fr 순환 차단
     셀 min-content(77.5px)가 grid 1fr 계산을 무력화하던 문제 해결 */
  .home-cal-grid { gap:2px; align-items:stretch; grid-auto-rows:auto; }
  .hc-cell  {
    min-width:0;
    aspect-ratio:auto;   /* 정사각형 강제 해제 — 행 최대 높이에 자동 맞춤 */
    min-height:44px;     /* 빈 칸이 너무 납작해지지 않도록 최소 높이 보호 */
    gap:2px; padding:4px 2px 4px; border-radius:6px;
  }
  .hc-num   { font-size:10px; }
  .hc-icon  { width:22px !important; height:22px !important; }
  .hc-weather-icon svg { width:14px; height:14px; }
  .hc-cell.hc-sunny .hc-weather-icon svg,
  .hc-cell.hc-cloud .hc-weather-icon svg,
  .hc-cell.hc-rain  .hc-weather-icon svg,
  .hc-cell.hc-cold  .hc-weather-icon svg { width:20px; height:20px; }
  .hc-weather-txt { font-size:8px; }
}
@media (max-width:480px) {
  /* border-radius(16px) 모서리 잘림 방지 — overflow 제거, padding 확보 */
  .home-cal-wrap { padding:12px 14px; overflow:visible; }
  /* 세그먼트 그룹 모바일 크기 축소 */
  .hc-seg-group { height:32px; }
  .hc-seg-arrow { width:30px; min-width:30px; height:32px; font-size:15px; }
  .hc-seg-mid { height:32px; font-size:11px; min-width:78px; padding:0 11px; }
  /* 캘린더 그리드 — 셀 축소 */
  .home-cal-grid { gap:2px; }
  .hc-cell { gap:2px; padding:3px 1px 1px; border-radius:6px; }
  .hc-num { font-size:9px; }
  /* 감정 아이콘 */
  .hc-icon { width:22px !important; height:22px !important; }
  /* 날씨 아이콘 (미래 셀) */
  .hc-weather-icon svg { width:14px; height:14px; }
  .hc-cell.hc-sunny .hc-weather-icon svg,
  .hc-cell.hc-cloud .hc-weather-icon svg,
  .hc-cell.hc-rain  .hc-weather-icon svg,
  .hc-cell.hc-cold  .hc-weather-icon svg { width:22px; height:22px; }
  .hc-weather-txt  { font-size:7.5px; }
  /* 범례 */
  .home-cal-legend { gap:3px; row-gap:4px; }
  .hcl-txt { font-size:9.5px; }
  .hcl-dot { width:7px; height:7px; }
  /* 요일 헤더 */
  .home-cal-dow { font-size:9px; }
  /* Today 카드 행 — 모바일 여백 최소화 */
  .hct-row { padding:8px 10px; }
  .hct-icon { width:28px; height:28px; }
  .hct-main { font-size:12.5px; }
}
/* mood-select-card 소형 화면 overflow 방지 */
@media (max-height:700px) {
  .mood-select-card {
    max-height:92dvh;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    padding:14px 16px;
  }
  .mood-section-block { padding:10px 12px; margin-bottom:6px; }
  .mood-title-badge { font-size:16px; }
  .mood-weather-auto-icon { font-size:22px; }
  .mood-weather-auto-comment { font-size:11px; }
  .mood-body-input { height:52px; }
  .mood-pick-item svg { width:28px; height:28px; }
  .mood-select-row { gap:5px; }
}

/* ══ Today's Mood 카드 — View All 버튼 ══ */
.hc-today-card-label {
  display:flex; align-items:center; justify-content:space-between;
}
.hc-today-viewall-btn {
  display:flex; align-items:center; gap:3px;
  background:rgba(181,106,76,.12);
  border:1px solid rgba(181,106,76,.28);
  border-radius:20px;
  padding:3px 8px 3px 9px;
  cursor:pointer;
  font-family:'Pretendard',sans-serif;
  font-size:10px; font-weight:700;
  letter-spacing:.04em;
  color:var(--rust);
  transition:all .22s ease;
  -webkit-tap-highlight-color:transparent;
  white-space:nowrap;
}
.hc-today-viewall-btn:hover {
  background:var(--rust);
  border-color:var(--rust);
  color:#fff;
}
.hc-today-viewall-btn svg { width:10px; height:10px; stroke:currentColor; flex-shrink:0; }

/* ══ 하루 한줄 타임라인 페이지 ══ */
#page-daylog { padding-bottom: 60px; }
.dl-header {
  padding:0 0 28px;
  border-bottom:1px solid var(--paper3);
  margin-bottom:28px;
}
.dl-page-title {
  font-family:'Playfair Display',serif;
  font-size:30px; font-weight:700;
  color:var(--ink); margin-bottom:5px; line-height:1.2;
}
.dl-page-count {
  font-family:'Pretendard',sans-serif;
  font-size:11px; color:var(--muted);
  letter-spacing:.08em;
}
.dl-loading, .dl-empty {
  text-align:center; padding:80px 0;
  font-family:'Pretendard',sans-serif;
  font-size:13px; color:var(--muted);
}
/* 월 그룹 헤더 */
.dl-month-header {
  display:flex; align-items:baseline; gap:10px;
  padding:28px 0 10px; margin-bottom:2px;
}
.dl-month-en {
  font-family:'Playfair Display',serif;
  font-size:11px; font-weight:700;
  letter-spacing:.2em; text-transform:uppercase;
  color:var(--rust);
}
.dl-month-kr {
  font-family:'Pretendard',sans-serif;
  font-size:11px; color:var(--muted); letter-spacing:.06em;
}
.dl-month-count {
  font-family:'Pretendard',sans-serif;
  font-size:10px; color:var(--muted); margin-left:auto; opacity:.6;
}
/* 타임라인 아이템 */
.dl-item {
  display:grid;
  grid-template-columns:56px 28px 1fr;
  align-items:stretch;
  margin-bottom:10px;
}
.dl-date {
  display:flex; flex-direction:column;
  align-items:flex-end; padding-right:14px;
  padding-top:14px; gap:2px;
}
.dl-day-num {
  font-family:'Playfair Display',serif;
  font-size:22px; font-weight:700;
  color:var(--ink2); line-height:1;
}
.dl-day-of-week {
  font-family:'Pretendard',sans-serif;
  font-size:9px; color:var(--muted);
  letter-spacing:.08em;
}
/* 수직선 + 도트 */
.dl-line {
  display:flex; flex-direction:column;
  align-items:center; position:relative;
}
.dl-line::before {
  content:''; position:absolute;
  top:0; bottom:0; left:50%;
  transform:translateX(-50%);
  width:1px; background:var(--paper3);
}
.dl-dot {
  width:11px; height:11px;
  border-radius:50%;
  position:relative; z-index:1;
  margin-top:16px; flex-shrink:0;
  transition:transform .2s;
}
.dl-item:hover .dl-dot { transform:scale(1.35); }
/* 카드 */
.dl-card {
  margin-left:14px; margin-bottom:4px;
  padding:13px 16px; border-radius:13px;
  border:1px solid transparent;
  transition:transform .2s ease, box-shadow .2s ease;
}
.dl-card:hover {
  transform:translateX(4px);
  box-shadow:0 4px 22px rgba(0,0,0,.07);
}
.dl-mood {
  display:flex; align-items:center;
  gap:7px; margin-bottom:8px;
}
.dl-mood-icon { width:22px; height:22px; flex-shrink:0; display:block; }
.dl-mood-label {
  font-family:'Pretendard',sans-serif;
  font-size:11px; font-weight:700;
  letter-spacing:.08em;
}
.dl-time {
  font-family:'Pretendard',sans-serif;
  font-size:10px; color:var(--muted);
  margin-left:auto; opacity:.65;
}
.dl-body {
  font-family:'Noto Serif KR',serif;
  font-size:14.5px; font-weight:400;
  color:var(--ink); line-height:1.82;
  word-break:keep-all;
}
@media (max-width:680px) {
  .dl-item { grid-template-columns:44px 22px 1fr; }
  .dl-day-num { font-size:18px; }
  .dl-card { margin-left:10px; padding:11px 13px; }
  .dl-body { font-size:13.5px; }
  .dl-page-title { font-size:24px; }
}


/* ══ 월간 감정 서사 모달 ══ */
.monthly-modal {
  z-index: 2050;
  background: linear-gradient(160deg,
    rgba(44,40,35,.78) 0%,
    rgba(90,58,40,.72) 55%,
    rgba(44,40,35,.82) 100%);
  backdrop-filter: blur(10px) saturate(1.4);
  padding: 20px;
}
.monthly-modal-inner {
  background: linear-gradient(170deg, #fdf9f4 0%, #f7f0e6 100%);
  width: 100%; max-width: 460px;
  border-radius: 18px;
  box-shadow:
    0 4px 6px rgba(44,40,35,.08),
    0 20px 60px rgba(44,40,35,.28),
    inset 0 1px 0 rgba(255,255,255,.9);
  position: relative;
  height: 82vh;
  max-height: 82vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(181,106,76,.18);
}

/* 헤더 */
.monthly-modal-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 24px 32px 16px;
  background: linear-gradient(180deg, rgba(181,106,76,.07) 0%, transparent 100%);
  border-bottom: 1px solid rgba(181,106,76,.14);
  flex-shrink: 0;
  gap: 12px;
}
.monthly-modal-eyebrow {
  font-size: 9.5px; font-weight: 700; letter-spacing: .14em;
  color: var(--rust); text-transform: uppercase;
  font-family: 'Pretendard', sans-serif;
  margin-bottom: 5px; opacity: .85;
}
.monthly-modal-title {
  font-size: 1.15rem; font-weight: 700;
  color: var(--ink);
  font-family: 'Playfair Display', serif;
  line-height: 1.3; margin: 0;
  letter-spacing: -.01em;
}
.monthly-modal-close {
  -webkit-appearance: none; appearance: none;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(181,106,76,.1); border: none;
  border-radius: 50%; font-size: .85rem; cursor: pointer;
  color: var(--muted); flex-shrink: 0; margin-top: 1px;
  transition: background .18s, color .18s;
}
.monthly-modal-close:hover {
  background: rgba(181,106,76,.22); color: var(--rust);
}

/* 스크롤 바디 */
.monthly-modal-body {
  padding: 22px 32px 32px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.monthly-modal-body::-webkit-scrollbar { width: 4px; }
.monthly-modal-body::-webkit-scrollbar-track { background: transparent; }
.monthly-modal-body::-webkit-scrollbar-thumb {
  background: rgba(181,106,76,.25); border-radius: 4px;
}

/* 요약 한 줄 */
.monthly-modal-summary {
  font-size: 14px; color: var(--ink);
  line-height: 1.85;
  font-family: 'Noto Serif KR', serif;
  font-weight: 400;
  padding: 14px 16px;
  background: rgba(181,106,76,.07);
  border-left: 3px solid var(--rust-l);
  border-radius: 0 8px 8px 0;
  margin-bottom: 20px;
}

/* 구분선 */
.monthly-modal-divider {
  border: none;
  border-top: 1px solid rgba(181,106,76,.15);
  margin: 18px 0;
  position: relative;
}
.monthly-modal-divider::after {
  content: '✦';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #f7f0e6;
  padding: 0 8px;
  font-size: 9px; color: var(--rust-l);
  letter-spacing: 2px;
}

/* 상세 서사 */
.monthly-modal-detail {
  font-size: 13.5px; color: var(--ink2);
  line-height: 1.92; font-family: 'Noto Serif KR', serif;
  word-break: keep-all;
}
.monthly-modal-detail p { margin: 0 0 16px; }
.monthly-modal-detail strong {
  font-weight: 700; color: var(--rust-d);
}

/* 감정 칩 */
.monthly-modal-chips {
  display: flex; flex-wrap: wrap; gap: 7px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(181,106,76,.12);
}
.monthly-modal-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-family: 'Pretendard', sans-serif;
  background: rgba(181,106,76,.09);
  border: 1px solid rgba(181,106,76,.18);
  border-radius: 20px; padding: 5px 11px;
  color: var(--ink2); letter-spacing: .01em;
}
.monthly-modal-chip-dot {
  font-size: 8px; line-height: 1;
}

/* 로딩 */
.monthly-modal-loading {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; padding: 44px 0;
}
.monthly-modal-loading-dots {
  display: flex; gap: 7px;
}
.monthly-modal-loading span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--rust-l); display: inline-block;
  animation: mmPulse 1.3s ease-in-out infinite;
}
.monthly-modal-loading span:nth-child(2) { animation-delay: .22s; }
.monthly-modal-loading span:nth-child(3) { animation-delay: .44s; }
.monthly-modal-loading-txt {
  font-size: 12px; color: var(--muted);
  font-family: 'Pretendard', sans-serif;
  letter-spacing: .03em;
}
@keyframes mmPulse {
  0%, 80%, 100% { transform: scale(.65); opacity: .4; }
  40%           { transform: scale(1);   opacity: 1; }
}

/* 오류 */
.monthly-modal-error {
  text-align: center; color: var(--muted);
  font-size: 13px; padding: 36px 0; line-height: 1.7;
}

/* 모바일 — 하단 시트 */
@media (max-width: 600px) {
  .monthly-modal {
    align-items: flex-end;
    padding: 0;
    background: linear-gradient(180deg,
      rgba(44,40,35,.65) 0%,
      rgba(44,40,35,.82) 100%);
  }
  .monthly-modal-inner {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 88vh;
    box-shadow:
      0 -8px 40px rgba(44,40,35,.22),
      inset 0 1px 0 rgba(255,255,255,.85);
  }
  .monthly-modal-inner  { height: 88vh; max-height: 88vh; }
  .monthly-modal-header { padding: 20px 24px 14px; }
  .monthly-modal-title  { font-size: 1.05rem; }
  .monthly-modal-body   { padding: 18px 24px 40px; }
}
