/* =========================================================
   diary_avocado — 아보카도 에디션 퍼스널 일기 스킨
   ========================================================= */

:root {
  --avo-green    : #7aad74;
  --avo-light    : #e8f2e7;
  --avo-dark     : #4a7c59;
  --avo-cream    : #f7f5f0;
  --avo-sand     : #ede8df;
  --avo-text     : #3a3a3a;
  --avo-muted    : #8a8a8a;
  --avo-border   : #ddd8cf;
  --avo-radius   : 14px;
  --avo-shadow   : 0 2px 12px rgba(0,0,0,.07);
  --font-ko      : 'Noto Serif KR', 'Noto Sans KR', serif;
}

/* ── 전체 래퍼 ──────────────────────────────────────── */
.dav-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px 80px;
  font-family: var(--font-ko);
  color: var(--avo-text);
}

/* ── 헤더 (연도/월 네비) ────────────────────────────── */
.dav-nav {
  text-align: center;
  padding: 28px 0 10px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--avo-cream);
}

/* 연도 탭 */
.dav-years {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.dav-yr-btn {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--avo-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  transition: color .2s, background .2s;
  text-decoration: none;
}
.dav-yr-btn:hover,
.dav-yr-btn.active {
  color: var(--avo-dark);
  background: var(--avo-light);
}

/* 월 필 */
.dav-months {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  padding-bottom: 4px;
}
.dav-mo-btn {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--avo-muted);
  background: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 20px;
  transition: all .2s;
  text-decoration: none;
}
.dav-mo-btn:hover {
  color: var(--avo-dark);
  border-color: var(--avo-green);
}
.dav-mo-btn.active {
  color: #fff;
  background: var(--avo-green);
  border-color: var(--avo-green);
}
.dav-mo-btn.disabled {
  opacity: .3;
  pointer-events: none;
}

/* 구분선 */
.dav-nav-divider {
  height: 1px;
  background: var(--avo-border);
  margin: 8px 0 0;
}

/* ── 뷰 토글 ──────────────────────────────────────── */
.dav-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0 10px;
}
.dav-count {
  font-size: .82rem;
  color: var(--avo-muted);
}
.dav-toggle {
  display: flex;
  gap: 6px;
}
.dav-toggle button {
  background: none;
  border: 1.5px solid var(--avo-border);
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  color: var(--avo-muted);
  font-size: .8rem;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.dav-toggle button.active,
.dav-toggle button:hover {
  border-color: var(--avo-green);
  color: var(--avo-dark);
  background: var(--avo-light);
}

/* ── 글쓰기 버튼 ──────────────────────────────────── */
.dav-write-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--avo-green);
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  padding: 7px 16px;
  font-size: .85rem;
  font-weight: 600;
  transition: background .2s;
}
.dav-write-btn:hover { background: var(--avo-dark); color:#fff; }

/* ── 갤러리 뷰 ──────────────────────────────────── */
.dav-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 4px;
}
.dav-card {
  background: #fff;
  border-radius: var(--avo-radius);
  box-shadow: var(--avo-shadow);
  overflow: hidden;
  text-decoration: none;
  color: var(--avo-text);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.dav-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.11);
}
.dav-card-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--avo-sand);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dav-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dav-card-thumb.no-img {
  background: linear-gradient(135deg, var(--avo-light), var(--avo-sand));
  color: var(--avo-green);
  font-size: 2rem;
}
.dav-card-body {
  padding: 12px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dav-card-date {
  font-size: .72rem;
  color: var(--avo-muted);
  letter-spacing: .03em;
}
.dav-card-title {
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dav-card-excerpt {
  font-size: .78rem;
  color: var(--avo-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}

/* ── 리스트 뷰 ──────────────────────────────────── */
.dav-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 4px;
}
.dav-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--avo-border);
  text-decoration: none;
  color: var(--avo-text);
  transition: background .15s;
  border-radius: 6px;
}
.dav-list-item:hover {
  background: var(--avo-light);
  padding-left: 10px;
  padding-right: 6px;
}
.dav-list-thumb-sm {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--avo-sand);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--avo-green);
  font-size: 1.2rem;
}
.dav-list-thumb-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dav-list-info { flex: 1; min-width: 0; }
.dav-list-date {
  font-size: .72rem;
  color: var(--avo-muted);
  margin-bottom: 3px;
}
.dav-list-title {
  font-size: .95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dav-list-excerpt {
  font-size: .8rem;
  color: var(--avo-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 빈 상태 ────────────────────────────────────── */
.dav-empty {
  text-align: center;
  padding: 60px 0;
  color: var(--avo-muted);
}
.dav-empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.dav-empty p { font-size: .9rem; }

/* ── 페이지네이션 ────────────────────────────────── */
.dav-paging {
  text-align: center;
  padding: 30px 0 0;
}
.dav-paging .pg_wrap { display: inline-flex; gap: 4px; align-items: center; }

/* ============================================================
   VIEW 스킨
   ============================================================ */
.dav-view-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 30px 16px 80px;
  font-family: var(--font-ko);
  color: var(--avo-text);
}

/* 뒤로가기 */
.dav-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--avo-muted);
  text-decoration: none;
  font-size: .83rem;
  margin-bottom: 24px;
  transition: color .2s;
}
.dav-back:hover { color: var(--avo-dark); }

/* 뷰 헤더 */
.dav-view-header {
  border-bottom: 2px solid var(--avo-border);
  padding-bottom: 16px;
  margin-bottom: 28px;
}
.dav-view-date {
  font-size: .78rem;
  color: var(--avo-muted);
  letter-spacing: .05em;
  margin-bottom: 8px;
}
.dav-view-title {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.4;
}

/* 이미지 갤러리 (뷰 내 첨부 이미지) */
.dav-view-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.dav-view-images img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  aspect-ratio: 1;
  cursor: pointer;
  transition: opacity .2s;
}
.dav-view-images img:hover { opacity: .9; }

/* 본문 */
.dav-view-content {
  font-size: .97rem;
  line-height: 1.9;
  word-break: break-word;
}
.dav-view-content p { margin: 0 0 1em; }
.dav-view-content img {
  max-width: 100%;
  border-radius: 10px;
}

/* 비이미지 첨부파일 */
.dav-attach-files {
  margin-top: 24px;
  padding: 16px;
  background: var(--avo-light);
  border-radius: 10px;
}
.dav-attach-files h4 {
  font-size: .8rem;
  color: var(--avo-muted);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.dav-attach-files a {
  display: block;
  font-size: .85rem;
  color: var(--avo-dark);
  text-decoration: none;
  padding: 3px 0;
}
.dav-attach-files a:hover { text-decoration: underline; }

/* ── 뷰 하단 버튼 ────────────────────────────────── */
.dav-view-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--avo-border);
}
.dav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 18px;
  border-radius: 9px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all .2s;
}
.dav-btn-edit {
  background: var(--avo-light);
  color: var(--avo-dark);
}
.dav-btn-edit:hover { background: var(--avo-green); color: #fff; }
.dav-btn-del {
  background: #fdecea;
  color: #c0392b;
}
.dav-btn-del:hover { background: #c0392b; color: #fff; }
.dav-btn-move {
  background: var(--avo-sand);
  color: var(--avo-text);
}
.dav-btn-move:hover { background: var(--avo-border); }
.dav-btn-list {
  background: var(--avo-sand);
  color: var(--avo-text);
}
.dav-btn-list:hover { background: var(--avo-border); }

/* ============================================================
   WRITE 스킨
   ============================================================ */
.dav-write-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 30px 16px 80px;
  font-family: var(--font-ko);
  color: var(--avo-text);
}
.dav-write-wrap h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--avo-dark);
}
.dav-field {
  margin-bottom: 18px;
}
.dav-field label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--avo-muted);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.dav-field input[type=text],
.dav-field textarea,
.dav-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1.5px solid var(--avo-border);
  border-radius: 10px;
  font-size: .93rem;
  font-family: var(--font-ko);
  background: #fff;
  color: var(--avo-text);
  transition: border-color .2s;
  outline: none;
}
.dav-field input[type=text]:focus,
.dav-field textarea:focus {
  border-color: var(--avo-green);
}
.dav-field textarea {
  min-height: 280px;
  resize: vertical;
  line-height: 1.8;
}

/* 파일 업로드 */
.dav-file-zone {
  border: 2px dashed var(--avo-border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  background: var(--avo-light);
  transition: border-color .2s;
}
.dav-file-zone:hover { border-color: var(--avo-green); }
.dav-file-zone input[type=file] {
  display: none;
}
.dav-file-label {
  cursor: pointer;
  color: var(--avo-dark);
  font-size: .88rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.dav-file-label span { font-size: 2rem; }
.dav-file-label small {
  color: var(--avo-muted);
  font-weight: 400;
  font-size: .76rem;
}

/* 쓰기 액션 버튼 */
.dav-write-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 28px;
}
.dav-btn-submit {
  background: var(--avo-green);
  color: #fff;
}
.dav-btn-submit:hover { background: var(--avo-dark); }
.dav-btn-cancel {
  background: var(--avo-sand);
  color: var(--avo-text);
}
.dav-btn-cancel:hover { background: var(--avo-border); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .dav-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .dav-view-title { font-size: 1.2rem; }
  .dav-view-actions { flex-wrap: wrap; }
  .dav-btn { padding: 8px 13px; font-size: .8rem; }
  .dav-nav { padding: 16px 0 8px; }
}

/* ✨ 글 본문 유리 배경 */
.dav-view-content {
    background: rgba(255, 255, 255, 0.65); /* 반투명 흰색 */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border-radius: 14px;
    padding: 20px;

    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}