@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; }

.diary-wrap .wrap-inner { display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem; }
.diary-wrap .wrap-actions { display:flex;gap:6px; }
.cat-name { width: 100%; font-size: 11px; color: #aaa; margin-bottom: 4px; margin-top: 6px; }

/* 왼쪽*/
.page-left { padding: 1.5rem; height: 709px; display: flex; flex-direction: column; overflow: hidden; }
.page-left .page-date-big { font-size: 18px; font-weight: 500; margin-bottom: 4px; }
.page-left .page-day { font-size: 12px; margin-bottom: 10px; }
.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; }
.page-right .right-memo span { font-style: normal; color: #aaa; }
.progress-wrapper { margin-bottom: 8px; }
.progress-wrapper .progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.progress-wrapper .progress-label { font-size: 11px; color: #bbb; }   
.progress-wrapper .progress-pct { font-size: 13px; font-weight: 500; }
.progress-wrapper .progress-bar-bg { background: #f0f0f0; border-radius: 999px; height: 5px; overflow: hidden; }
.progress-wrapper .progress-bar { height: 100%; border-radius: 999px; background: #aaa; width: 0%; transition: width .3s; }

.right-page-content { padding: 1.25rem; height: 100%; box-sizing: border-box; }
.right-memo { font-size: 13px; color: var(--dk-text, #555); font-style: italic; margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px dashed var(--dk-border, #e0e0e0); line-height: 1.6; }
.right-checklist { display: flex; flex-direction: column; gap: 6px; }
.cl-item { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 0; user-select: none; }
.cl-item:hover .cl-text { opacity: .7; }
.cl-check { font-size: 16px; flex-shrink: 0; color: var(--dk-meta, #aaa); }
.cl-item.done .cl-check { color: var(--dk-date, #333); }
.cl-text { font-size: 13px; color: var(--dk-text, #333); transition: all .15s; }
.cl-item.done .cl-text { text-decoration: line-through; color: var(--dk-meta, #aaa); }



/* 스티커 */
.sticker-zone { position: absolute; inset: 0; }
#dk_layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.dk-sticker { position: absolute; cursor: move; user-select: none; touch-action: none; }
.dk-sticker img  { display: block; width: 100%; height: auto; pointer-events: none; }
.dk-sticker .dk-emoji { display: block; line-height: 1; pointer-events: none; font-size: inherit; }
.dk-sticker.active { outline: 1.5px dashed #aaa; outline-offset: 3px; z-index: 100; }
.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; }
.dk-ctrl { position: absolute; bottom: -26px; left: 50%; transform: translateX(-50%); display: none; gap: 3px; background: #fff; border: 1px solid #ddd; border-radius: 6px; padding: 2px 4px; white-space: nowrap; z-index: 200; }
.dk-sticker.active .dk-ctrl { display: flex; }
.dk-ctrl button { border: none; background: none; font-size: 11px; cursor: pointer; padding: 2px 4px; border-radius: 3px; color: #555; }
.dk-ctrl button:hover { background: #f0f0f0; }
.dk-ctrl .dk-del { color: #e55; }

/* 크기 조절 핸들 */
.dk-handle { position: absolute; width: 10px; height: 10px; background: #fff; border: 1.5px solid #aaa; border-radius: 2px; display: none; cursor: se-resize; }
.dk-sticker.active .dk-handle { display: block; }
.dk-handle.br { bottom: -5px; right: -5px; cursor: se-resize; }
.dk-handle.bl { bottom: -5px; left: -5px; cursor: sw-resize; }
.dk-handle.tr { top: -5px; right: -5px; cursor: ne-resize; }
.dk-handle.tl { top: -5px; left: -5px; cursor: nw-resize; }


/* 스티커 패널 (운영자) */
.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; }
.sticker-panel-tabs { display: flex; gap: 0; border-bottom: 1px solid #f0f0f0; }
.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; }

.sp-tabs { display: flex; 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; }
.sp-body { padding: 10px 12px; display: none; flex-wrap: wrap; gap: 6px; }
.sp-body.on { display: flex; }
.sk-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; }
.sk-btn:hover { border-color: #ccc; }
.sk-btn img { width: 100%; height: 100%; object-fit: contain; }
.emoji-row { display: flex; gap: 8px; align-items: center; width: 100%; flex-wrap: wrap; }
.emoji-row input { flex: 1; min-width: 80px; padding: 7px 10px; border: 1px solid #eee; border-radius: 6px; font-size: 20px; outline: none; }
.emoji-row a { font-size: 11px; color: #bbb; text-decoration: none; }

.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; }

/* 본문 인라인 사진 */
.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; }


/* 사진 갤러리 */
.photo-gallery { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; }
.photo-gallery img { height: 100px; width: auto; border-radius: 6px; object-fit: cover; cursor: pointer; border: 1px solid #eee; }


/* 작성 폼 */
.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; }
.diary-form .form-date { width: 140px; font-size: 13px; }
.diary-form-body .form-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.diary-form-body .btn-secondary { font-size: 11px; padding: 4px 10px; }
.diary-form-body #dk_inline_status { font-size: 11px; color: #bbb; }
.form-right { border-top: 1px solid #f0f0f0; padding-top: 1rem; margin-top: .5rem; margin-bottom: 1rem; }
.form-right .form-label { font-size: 11px; color: #bbb; margin-bottom: 6px; }
.form-right .df-input { flex:1; width: 100%; margin-bottom: 8px; }
.form-right .cl-row { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
.form-right .form-right-btn { border: none; background: none; color: #ccc; cursor: pointer; font-size: 16px; padding: 0; }
.form-right .form-plus-btn { font-size: 12px; color: #aaa; border: 1px dashed #ddd; border-radius: 6px; background: none; padding: 4px 12px; cursor: pointer; margin-top: 4px; width: 100%; }
.diary-form-ft #pw-btn { font-size:11px;padding:2px 8px;border:1px solid #ddd;border-radius:4px;background:#fff;cursor:pointer }
.diary-form-ft .pw-label { font-size: 12px; color: #888; }
.diary-form-ft .btn-group { display: flex; gap: 8px; }