@charset "utf-8";

/* 목록 */
.write-btn-wrap { text-align: right; margin-bottom: .75rem; }
.write-btn { display: inline-block; padding: 5px 14px; border: 1px solid #ddd; border-radius: 999px; background: #fff; color: #555; font-size: 12px; text-decoration: none; }
.write-btn:hover { background: #f8f8f8; }

.notebook { border: 1px solid #eee; border-radius: 12px; overflow: hidden; margin-bottom: 2rem; background: #fff; }
.nb-month { padding: 8px 16px; background: #fafafa; border-bottom: 1px solid #f0f0f0; font-size: 12px; font-weight: 500; color: #888; }
.nb-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid #f5f5f5; cursor: pointer; transition: background .1s; text-decoration: none; color: inherit; }
.nb-item:last-child { border-bottom: none; }
.nb-item:hover { background: #fafafa; }
.nb-dot { width: 5px; height: 5px; border-radius: 50%; background: #ccc; flex-shrink: 0; }
.nb-date { font-size: 11px; color: #aaa; width: 68px; flex-shrink: 0; }
.nb-title { font-size: 13px; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nb-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nb-meta { font-size: 11px; color: #bbb; }

.empty-state { text-align: center; padding: 3rem 0; color: #bbb; font-size: 14px; }
.empty-state a { color: #999; display: inline-block; margin-top: .5rem; font-size: 13px; }

/* 본문: 다이어리 스프레드 */
.view-back { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #888; margin-bottom: 1rem; text-decoration: none; }
.view-back:hover { color: #333; }

.spread-wrap { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #e0e0e0; border-radius: 12px; overflow: hidden; background: #fff; margin-bottom: 1rem; height: 709px; position: relative; }
.spread-spine { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: #e0e0e0; pointer-events: none; z-index: 1; }

/* 왼쪽: 텍스트 */
.page-left { padding: 1.5rem; height: 709px; display: flex; flex-direction: column; overflow: hidden; }
.page-date-big { font-size: 20px; font-weight: 500; margin-bottom: 2px; }
.page-day { font-size: 12px; color: #aaa; margin-bottom: 12px; }
.page-meta { display: flex; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; margin-bottom: 14px; }
.page-meta-item { font-size: 12px; color: #666; }
.page-meta-label { color: #bbb; margin-right: 3px; }
.page-body { font-size: 13px; line-height: 1.9; color: #333; flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; padding-bottom: 32px; }
.page-body p { margin-bottom: .7rem; }
.page-body p:last-child { margin-bottom: 0; }

/* 오른쪽: 스티커 꾸미기 */
.page-right { position: relative; background: #fafafa; overflow: hidden; height: 709px; }
.sticker-zone { position: absolute; inset: 0; }

/* 스티커 */
.dk-sticker { position: absolute; cursor: move; user-select: none; line-height: 1; }
.dk-sticker img { display: block; width: 100%; height: auto; pointer-events: none; }
.dk-sticker .dk-emoji { font-size: inherit; pointer-events: none; display: block; }
.dk-sticker.active { outline: 1.5px dashed #aaa; outline-offset: 3px; }
.dk-del-btn { position: absolute; top: -8px; right: -8px; width: 18px; height: 18px; border-radius: 50%; background: #e55; color: #fff; border: none; font-size: 10px; cursor: pointer; display: none; align-items: center; justify-content: center; z-index: 10; padding: 0; }
.dk-sticker.active .dk-del-btn { display: flex; }
.dk-resize-handle { position: absolute; bottom: -4px; right: -4px; width: 10px; height: 10px; background: #fff; border: 1.5px solid #aaa; border-radius: 2px; cursor: se-resize; display: none; z-index: 10; }
.dk-sticker.active .dk-resize-handle { display: block; }

/* 스티커 패널 (운영자) */
.sticker-panel { border: 1px solid #eee; border-radius: 12px; overflow: hidden; background: #fff; margin-bottom: 1rem; }
.sticker-panel-hd { padding: 8px 14px; background: #fafafa; border-bottom: 1px solid #f0f0f0; font-size: 12px; font-weight: 500; color: #888; display: flex; justify-content: space-between; align-items: center; }
.sticker-panel-tabs { display: flex; gap: 0; border-bottom: 1px solid #f0f0f0; }
.sp-tab { flex: 1; padding: 8px; text-align: center; font-size: 12px; color: #aaa; cursor: pointer; border-bottom: 2px solid transparent; }
.sp-tab.on { color: #333; border-bottom-color: #333; }
.sticker-panel-body { padding: 10px 12px; display: none; }
.sticker-panel-body.on { display: flex; flex-wrap: wrap; gap: 6px; }
.sk-img-btn { width: 52px; height: 52px; border: 1px solid #eee; border-radius: 8px; background: #fff; cursor: pointer; padding: 4px; display: flex; align-items: center; justify-content: center; transition: border-color .1s; }
.sk-img-btn:hover { border-color: #ccc; }
.sk-img-btn img { width: 100%; height: 100%; object-fit: contain; }
.emoji-input-row { display: flex; gap: 8px; align-items: center; width: 100%; }
.emoji-input-row input { flex: 1; padding: 7px 10px; border: 1px solid #eee; border-radius: var(--radius, 6px); font-size: 20px; outline: none; }
.emoji-input-row a { font-size: 11px; color: #bbb; text-decoration: none; white-space: nowrap; }
.emoji-input-row a:hover { color: #888; }
.emoji-add-btn { padding: 7px 14px; border: 1px solid #ddd; border-radius: 999px; background: #fff; font-size: 12px; cursor: pointer; white-space: nowrap; }

.save-row { display: flex; justify-content: flex-end; gap: 8px; }
.btn-primary { padding: 6px 18px; border-radius: 999px; background: #222; color: #fff; border: none; font-size: 12px; cursor: pointer; }
.btn-secondary { padding: 6px 14px; border-radius: 999px; border: 1px solid #ddd; background: #fff; color: #666; font-size: 12px; cursor: pointer; text-decoration: none; display: inline-block; }

/* 이전/다음 */
.view-nav { display: flex; justify-content: space-between; font-size: 12px; margin-top: 1rem; }
.view-nav a { color: #888; text-decoration: none; }
.view-nav a:hover { color: #333; }

/* 비밀글 */
.pw-box { max-width: 360px; margin: 60px auto; padding: 32px; background: #fff; border: 1px solid #eee; border-radius: 12px; text-align: center; }
.pw-box h3 { font-size: 16px; font-weight: 500; margin: 0 0 6px; }
.pw-box p { font-size: 13px; color: #999; margin: 0 0 20px; }

/* 작성 폼 */
.diary-form { border: 1px solid #eee; border-radius: 12px; overflow: hidden; background: #fff; }
.diary-form-hd { padding: 1rem 1.25rem; border-bottom: 1px solid #f0f0f0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.diary-form-date { font-size: 14px; font-weight: 500; color: #333; }
.df-input { border: 1px solid #eee; border-radius: 6px; padding: 5px 10px; font-size: 12px; background: #fafafa; color: #333; width: 90px; outline: none; font-family: inherit; }
.df-input:focus { border-color: #ccc; background: #fff; }
.df-input::placeholder { color: #ccc; }
.diary-form-body { padding: 1.25rem; }
.df-title { width: 100%; border: none; border-bottom: 1px solid #f0f0f0; padding: 0 0 10px; font-size: 16px; font-weight: 500; background: transparent; color: #333; margin-bottom: 1rem; outline: none; font-family: inherit; }
.df-title::placeholder { color: #ccc; }
.df-textarea { width: 100%; border: none; resize: vertical; font-size: 14px; line-height: 1.85; background: transparent; color: #333; font-family: inherit; outline: none; min-height: 200px; }
.df-textarea::placeholder { color: #ccc; }
.diary-form-ft { padding: .75rem 1.25rem; border-top: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.df-pw-wrap { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #bbb; }

/* 본문 인라인 사진 */
.inline-photo { max-width: 100%; border-radius: 8px; margin: 8px 0; cursor: pointer; display: block; }

/* 본문 스크롤바 */
.page-body::-webkit-scrollbar { width: 5px; }
.page-body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
.page-body::-webkit-scrollbar-track { background: transparent; }
