/* tabula.css */
/* 관리자 전용 서판 탭. day_log 화면을 사이트 색 변수 위에 옮긴다 */
.sc{max-width:680px;margin:0 auto 40px;font-size:20.25px;line-height:1.6}
.sc button{font-family:inherit}
.sc-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;border-bottom:1px solid var(--border);margin-bottom:14px}
.sc-subs{display:flex}
.sc-sub{background:none;border:none;border-bottom:2px solid transparent;color:var(--text2);font-size:17.55px;font-weight:500;padding:8px 14px;margin-bottom:-1px;cursor:pointer}
.sc-sub.on{color:var(--text);border-bottom-color:var(--accent)}
.sc-sync{display:flex;align-items:center;gap:6px;font-size:14.85px;color:var(--text3)}
.sc-dot{font-size:13.5px;color:var(--text3)}
.sc-dot.ok{color:#2db87e}
.sc-dot.busy{color:#d4a030}
.sc-dot.err{color:#e05a4a}
.sc-q{font-family:'Courier New',monospace}
.sc-note{font-size:16.2px;color:#e05a4a;line-height:1.6}
.sc-note:not(:empty){margin-bottom:12px}

.sc-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin-bottom:16px}
.sc-stamp{font-family:'Courier New',monospace;font-size:17.55px;color:var(--accent);margin-bottom:8px;letter-spacing:.04em}
.sc-chars{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}
.sc-char{background:var(--surface2);border:1px solid var(--border2);border-radius:var(--radius-sm);color:var(--text);font-size:21.6px;width:44px;height:44px;cursor:pointer}
.sc-input{display:block;width:100%;background:var(--surface2);border:1px solid var(--border2);border-radius:var(--radius-sm);color:var(--text);font-family:IB,serif;font-size:20.25px;line-height:1.7;padding:12px;resize:none;overflow:hidden;box-sizing:border-box;outline:none}
.sc-input:focus{border-color:var(--accent)}
.sc-edit{font-size:18.9px;margin-top:4px}
.sc-attach-bar{display:flex;gap:8px;margin:10px 0;flex-wrap:wrap}
.sc-attach-bar input{display:none}
.sc-row{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.sc-btn{border:none;border-radius:var(--radius-sm);padding:8px 14px;font-size:17.55px;font-weight:600;cursor:pointer;background:var(--accent);color:#111}
.sc-btn.ghost{background:var(--surface2);color:var(--text2);border:1px solid var(--border2);font-weight:500}
.sc-btn.ghost:hover{color:var(--text)}
.sc-btn:disabled{opacity:.4;cursor:not-allowed}
.sc-pin{display:flex;align-items:center;gap:6px;font-size:17.55px;color:var(--text2);cursor:pointer;user-select:none;margin-left:4px}
.sc-pin input{width:22px;height:22px;accent-color:#d4a030;cursor:pointer}
.sc-tp{display:flex;align-items:center;gap:6px}
.sc-topic{width:12em;background:var(--surface2);border:1px solid var(--border2);border-radius:var(--radius-sm);color:var(--text);font-family:inherit;font-size:17.55px;padding:5px 8px;outline:none}
.sc-topic:focus{border-color:#d4a030}
.sc-tpbtn{padding:5px 10px}
.sc-tplist{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;padding:10px;background:var(--surface2);border:1px solid var(--border2);border-radius:var(--radius-sm)}
.sc-tpchip{background:none;border:1px solid #d4a030;border-radius:3px;color:#d4a030;font-size:16.2px;padding:3px 9px;cursor:pointer}
.sc-tpchip:hover{background:#d4a030;color:#111}
.sc-tpnone{font-size:16.2px;color:var(--text3)}
.sc-pin-tag{font-family:inherit;font-size:13.5px;font-weight:600;color:#d4a030;border:1px solid #d4a030;border-radius:3px;padding:0 5px;margin-left:8px}
.sc-prog{font-size:16.2px;color:#d4a030;margin:6px 0}

.sc-preview{display:flex;flex-direction:column;gap:8px}
.sc-preview:not(:empty){margin:8px 0}
.sc-pv{display:flex;align-items:center;gap:10px;background:var(--surface2);border:1px solid var(--border2);border-radius:var(--radius-sm);padding:8px}
.sc-pv img{width:56px;height:56px;object-fit:cover;border-radius:4px}
.sc-pv-ic{width:56px;text-align:center;font-size:17.55px;color:var(--text2)}
.sc-pv-info{flex:1;min-width:0;font-size:16.2px;color:var(--text2)}
.sc-pv-info div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sc-pv-info small{color:var(--text3)}
.sc-x{background:rgba(0,0,0,.55);border:none;color:#ccc;font-size:14.85px;width:28px;height:28px;border-radius:50%;cursor:pointer;flex-shrink:0;line-height:1}
.sc-x:hover{background:#e05a4a;color:#fff}

.sc-week{margin-bottom:22px}
.sc-week-head{display:flex;justify-content:space-between;align-items:center;font-size:17.55px;font-weight:600;color:var(--text2);padding:8px 0;border-bottom:1px solid var(--border);margin-bottom:12px;cursor:pointer;user-select:none}
.sc-wk{color:var(--accent)}
.sc-wc{font-size:14.85px;color:var(--text3);font-weight:400}
.sc-week-body.folded{display:none}
.sc-scroll{position:relative;padding-left:18px}
.sc-scroll::before{content:'';position:absolute;left:5px;top:6px;bottom:6px;border-left:1px dotted var(--border2)}
.sc-day{display:flex;align-items:center;gap:10px;margin:16px 0 10px;font-size:14.85px;font-weight:600;color:var(--text2);white-space:nowrap}
.sc-day:first-child{margin-top:2px}
.sc-day::after{content:'';flex:1;border-top:1px dotted var(--border2)}
.sc-dow{color:var(--accent);margin-left:5px}
.sc-entry{position:relative;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;margin-bottom:10px}
.sc-entry::before{content:'';position:absolute;left:-17px;top:26px;width:7px;height:7px;border-radius:50%;background:var(--accent)}
.sc-qc{font-family:'Courier New',monospace;font-size:16.2px;color:var(--accent);margin-bottom:6px}
.sc-qc span{font-family:inherit;font-size:14.85px;color:var(--text3);margin-left:8px}
.sc-body{font-family:IB,serif;font-size:18.9px;white-space:pre-wrap;word-break:break-word;line-height:1.75}
.sc-acts{display:flex;gap:6px;margin-top:10px}
.sc-acts button{background:none;border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text3);font-size:16.2px;padding:3px 10px;cursor:pointer}
.sc-acts button:hover{color:var(--text);border-color:var(--border2)}
.sc-acts .del{color:#e05a4a}
.sc mark{background:#2b1e08;color:#d4a030;border-radius:2px;padding:0 2px}

.sc-attach{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.sc-tail{margin-top:10px}
.sc-blk{margin:10px 0}
.sc-body+.sc-body{margin-top:.9em}
.sc-attach+.sc-body{margin-top:10px}
.sc-edblocks .sc-it{cursor:grab;border-radius:var(--radius-sm);user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.sc-edblocks .sc-it textarea{cursor:text;user-select:text;-webkit-user-select:text}
.sc-edblocks .sc-it img{-webkit-user-drag:none;cursor:grab}
.sc-edblocks .sc-it.dragging{outline:1px solid var(--accent);background:var(--surface2);box-shadow:0 4px 14px rgba(0,0,0,.35);cursor:grabbing}
.sc-blkbtn{padding:4px 12px;font-size:16.2px}
.sc-blk .sc-body{margin-top:6px}
.sc-edblocks .sc-attach,.sc-edblocks .sc-preview{margin-top:10px}
.sc-tail:empty{display:none}
.sc-img-wrap{position:relative;display:inline-block;align-self:flex-start;max-width:100%}
.sc-img{display:block;max-width:100%;min-height:40px;border-radius:var(--radius-sm);cursor:zoom-in;background:var(--surface2)}
.sc-img-wrap .sc-x{position:absolute;top:5px;right:5px}
.sc-attach .sc-x{display:none}
.sc-entry.editing .sc-attach .sc-x{display:block}
.sc-entry.editing .sc-acts{display:none}
.sc-media audio{width:100%}
.sc-fname{display:flex;align-items:center;gap:8px;font-size:16.2px;color:var(--text2);min-width:0}
.sc-pdf{background:var(--surface2);border:1px solid var(--border2);border-radius:var(--radius-sm);color:var(--text);font-size:16.2px;padding:5px 10px;cursor:pointer}
.sc-pdf:hover{border-color:var(--accent)}
.sc-broken{font-size:16.2px;color:var(--text2);padding:8px 12px;border:1px dashed #e05a4a;border-radius:var(--radius-sm)}
.sc-broken code{color:#e05a4a;font-family:'Courier New',monospace}

.sc-more{text-align:center;margin-top:10px}
.sc-wrow{display:flex;justify-content:space-between;align-items:center;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;margin-bottom:8px;cursor:pointer;color:var(--text3)}
.sc-wrow:hover{border-color:var(--border2);background:var(--surface2)}
.sc-wrow-label{font-size:18.9px;font-weight:600;color:var(--text)}
.sc-wrow-meta{font-size:16.2px}
.sc-trow span{transition:transform .15s}
.sc-trow.on{border-color:#d4a030}
.sc-trow.on span{transform:rotate(90deg)}
.sc-tedit{background:none;border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text2);font-family:inherit;font-size:16.2px;min-width:38px;padding:3px 10px;cursor:pointer}
.sc-tedit:hover{color:var(--text);border-color:var(--border2)}
.sc-tedit.on{color:#111;background:#d4a030;border-color:#d4a030;font-weight:600}
.sc-tname{width:14em;max-width:100%;background:var(--surface2);border:1px solid #d4a030;border-radius:var(--radius-sm);color:var(--text);font-family:inherit;font-size:18.9px;font-weight:600;padding:3px 8px;outline:none;cursor:text}
.sc-tright{display:flex;align-items:center;gap:12px}
.sc-tkeep{width:22px;height:22px;accent-color:#d4a030;cursor:pointer;margin:0}
.sc-tbody{margin:4px 0 16px}
.sc-pgnav{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;margin:2px 0 8px}
.sc-pgnav.btm{margin:10px 0 0}
.sc-pgbtn{background:none;border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text2);font-size:16.2px;min-width:30px;padding:3px 8px;cursor:pointer}
.sc-pgbtn:hover:not(:disabled){color:var(--text);border-color:var(--border2)}
.sc-pgbtn.on{color:#111;background:#d4a030;border-color:#d4a030;font-weight:600}
.sc-pgbtn:disabled{opacity:.35;cursor:default}
.sc-trow{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.sc-tgrp.dragging .sc-trow{border-color:var(--accent);background:var(--surface2);box-shadow:0 4px 14px rgba(0,0,0,.35);cursor:grabbing}
.sc-tgrp.dragging .sc-tbody{opacity:.4}
.sc-search{width:100%;background:var(--surface2);border:1px solid var(--border2);border-radius:var(--radius-sm);color:var(--text);font-family:inherit;font-size:18.9px;padding:10px 14px;outline:none;margin-bottom:12px}
.sc-search:focus{border-color:var(--accent)}
.sc-label{font-size:16.2px;color:var(--text3);margin-bottom:10px}
.sc-empty{text-align:center;padding:36px 16px;color:var(--text3);font-size:17.55px}

.sc-audio-stop{position:fixed;top:12px;right:12px;z-index:55;background:var(--surface);border:1px solid #d4a030;border-radius:var(--radius-sm);color:#d4a030;font-family:inherit;font-size:16.2px;padding:5px 10px;cursor:pointer;box-shadow:0 2px 10px rgba(0,0,0,.35)}
.sc-audio-stop:hover{background:#d4a030;color:#111}
.sc-audio-stop[hidden]{display:none}
.sc-lightbox{position:fixed;inset:0;z-index:60;background:rgba(0,0,0,.9);display:flex;align-items:center;justify-content:center;cursor:zoom-out}
.sc-lightbox[hidden]{display:none}
.sc-lightbox img{max-width:95vw;max-height:90vh;object-fit:contain;border-radius:4px}

/* 폰 폭: 특문·첨부 버튼을 한 줄에 맞추고 태그 줄을 카드 폭에 채운다 */
@media (max-width:480px){
  .sc-card{padding:12px}
  .sc-chars{flex-wrap:nowrap;gap:4px}
  .sc-char{flex:1 1 0;min-width:0;max-width:44px;width:auto;height:40px;padding:0}
  .sc-attach-bar{gap:6px}
  .sc-attach-bar .sc-btn{flex:1 1 auto;padding:8px 6px;text-align:center}
  .sc-tp{flex:1 1 100%}
  .sc-pin{margin-left:0}
  .sc-topic{flex:1;min-width:0;width:auto}
}
