/* 🪑 책상 모드 문구 (도련 11-02 · js/deskgd.js) : ✏️ 펜꽂이가 다가와요 · 🗄️ 문구함 서랍이 열려요 */
.dkw-room { position: fixed; inset: 0; z-index: 1300; display: grid; place-items: center; background: transparent; opacity: 0; transition: opacity .2s; font-family: inherit; }
.dkw-room.show { opacity: 1; }
.dkw-room[hidden] { display: none; }
body:has(#pelRoom.show, #pcbRoom.show, #spkRoom.show, #pmRoom.show, #tkRoom.show) .dkw-room { z-index: 1700; }
body:has(#pelRoom.show, #pcbRoom.show, #spkRoom.show, #pmRoom.show, #tkRoom.show) .dkw-say { z-index: 1710; }   /* 🪡 스티커를 떼는 화면 위에서 핀셋을 찾으면 펜꽂이 · 서랍이 그 위로 (도련 11-05 : 떼는 화면 캔버스가 덮어 도구가 안 잡혔어요) */
.dkw-room button { font-family: inherit; cursor: pointer; }
.dkw-b { border: 2px solid #e88fb0; background: #fff; color: #c2457a; border-radius: 999px; padding: 7px 15px; font-size: 14px; font-weight: 800; box-shadow: 2px 2px 0 #e6dcf8; white-space: nowrap; }
.dkw-b:hover { background: #fff0f5; }
.dkw-say { position: fixed; left: 50%; top: 50%; translate: -50% -100%; z-index: 1400; background: #fff; border: 3px solid #e88fb0; color: #c2457a; font-weight: 900; font-size: 14px; padding: 9px 18px; border-radius: 999px; box-shadow: 3px 3px 0 #e6dcf8; opacity: 0; pointer-events: none; transition: opacity .2s; white-space: nowrap; }
.dkw-say.on { opacity: 1; }

/* ✏️ 펜꽂이 */
.dkw-cupbox { display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none; }
.dkw-cupbox > * { pointer-events: auto; }
.dkw-hint { margin: 0; background: rgba(255, 255, 255, .95); border-radius: 999px; padding: 8px 18px; font-size: 14px; font-weight: 800; color: #5b3f4a; text-align: center; }
.dkw-hint b { color: #c2457a; }
.dkw-hint small { display: block; font-size: 11.5px; color: #a07f8b; font-weight: 700; }
.dkw-cupart { position: relative; margin-top: 150px; }
.dkw-tools { position: absolute; inset: 0; z-index: 2; }
/* 펜꽂이 장면 = 소품 그림 · 꽂힌 도구 · 앞벽 (책상 위 .dkw-desk · 다가온 .dkw-cupart 같은 틀) */
.dkw-cupimg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; user-select: none; -webkit-user-drag: none; }
.dkw-cupfm { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.dkw-cupfm > i { position: absolute; inset: 0; -webkit-mask: var(--fm) 0 0 / 100% 100% no-repeat; mask: var(--fm) 0 0 / 100% 100% no-repeat; }
.dkw-cupfm img { display: block; width: 100%; height: 100%; }
.dkw-desk { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.dkw-desk > .dkw-cupimg { display: none; }   /* 책상 위 = 소품 그림은 이미 있어요 */
.dkw-desk .dkw-t { pointer-events: none; filter: none; transition: none; }
.dkw-t { position: absolute; padding: 0; border: 0; background: none; touch-action: none; cursor: grab; transform-origin: 50% 100%; transform: translateX(-50%) rotate(var(--a)); transition: transform .18s, opacity .3s; filter: drop-shadow(0 2px 2px rgba(80, 40, 50, .18)); }
.dkw-t > svg { display: block; height: 100%; width: auto; max-width: 90px; pointer-events: none; }
.dkw-t:hover { transform: translateX(-50%) translateY(-12px) rotate(var(--a)); }
.dkw-t.grab { transition: none; cursor: grabbing; z-index: 9 !important; }
.dkw-t.nudge { animation: dkwNudge .45s ease; }
@keyframes dkwNudge { 30% { translate: 0 -16px; } 60% { translate: 0 -4px; } }
.dkw-t.pull { transform: translateX(-50%) translateY(-460px) rotate(0deg); opacity: 0; transition: transform .35s ease-in, opacity .35s ease-in; }
.dkw-btns { display: flex; gap: 10px; }

/* 🗄️ 문구함 서랍 */
.dkw-drawer { width: min(900px, 94vw); max-height: 90vh; filter: drop-shadow(0 14px 22px rgba(60, 30, 40, .3)); }
.dkw-dtop { gap: 10px; padding: 10px 14px 8px; }   /* 틀 = css/style.css 🗄️ 서랍 창 틀 하나 */
.dkw-dtop b { font-size: 16px; font-weight: 900; }
.dkw-dtop small { font-size: 12px; font-weight: 700; opacity: .85; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dkw-dx { border: 0; background: #fff; color: var(--dk); width: 30px; height: 30px; border-radius: 50%; font-size: 15px; font-weight: 900; flex: none; }
.dkw-din { flex: 1 1 auto; min-height: 0; padding: 0 14px 14px; overflow-y: auto; overflow-x: hidden; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0; overscroll-behavior: contain; }   /* 칸막이가 많아지면 서랍 안을 위아래로 (칸막이 높이 = 들어 있는 만큼) */
.dkw-sec { background: repeating-linear-gradient(90deg, var(--dl) 0 22px, var(--dm) 22px 23px); border: 3px solid var(--dk); margin: -1.5px; padding: 6px 8px 8px; min-height: 0; box-sizing: border-box; flex: 0 0 calc(100% + 3px); min-width: 0; }
.dkw-sec.dkw-pen, .dkw-sec.wide { flex-basis: calc(100% + 3px); }
.dkw-sec h4 { margin: 0 0 6px; display: flex; justify-content: space-between; font-size: 13px; font-weight: 900; color: var(--dk); }
.dkw-sec h4 small { font-weight: 800; opacity: .75; }
.dkw-rowbox { position: relative; }
.dkw-row { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; touch-action: pan-x; overscroll-behavior-x: contain; }   /* 한 줄 · 옆으로 (끝없이 = js dkwRowWire) */
.dkw-row::-webkit-scrollbar { display: none; }
.dkw-row.drag, .dkw-row.drag * { cursor: grabbing; }
.dkw-its { display: flex; flex-wrap: nowrap; gap: 6px; width: max-content; }
.dkw-it { flex: none; }
.dkw-go { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--dk); background: #fff; color: var(--dk); font-size: 18px; font-weight: 900; line-height: 1; padding: 0; box-shadow: 0 2px 6px rgba(80, 40, 50, .2); }
.dkw-go[hidden] { display: none; }
.dkw-go.l { left: -6px; } .dkw-go.r { right: -6px; }
.dkw-it { position: relative; width: 74px; }
.dkw-use { width: 100%; border: 0; background: transparent; border-radius: 12px; padding: 4px 2px 5px; text-align: center; color: #5b3f4a; transition: transform .12s, background .12s; }
.dkw-use:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .7); }
.dkw-art { display: flex; justify-content: center; align-items: flex-end; height: 66px; }
.dkw-art > svg { height: 100%; width: auto; max-width: 70px; }
.dkw-it.pen .dkw-art > svg, .dkw-pen .dkw-art > svg { height: 100%; }
.dkw-use b { display: block; font-size: 10.5px; line-height: 1.25; margin-top: 3px; word-break: keep-all; }
.dkw-use em { display: inline-block; margin-top: 2px; font-style: normal; font-size: 9.5px; font-weight: 900; color: #fff; background: #8bc79a; border-radius: 999px; padding: 0 6px; }
.dkw-it.need .dkw-use { animation: gdNeedTool .65s ease-in-out 4 alternate; }
.dkw-none { grid-column: 1 / -1; text-align: center; padding: 30px 10px; font-weight: 800; color: var(--dk); line-height: 2.2; }
.dkw-dfront { height: 62px; gap: 16px; }
.dkw-lbl { font-size: 13px; font-weight: 900; background: #fff; border: 2px solid var(--dk); color: var(--dk); border-radius: 6px; padding: 2px 10px; }
.dkw-knob { width: 24px; height: 24px; }
.dkw-foot { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 10px 6px 0; flex-wrap: wrap; }
.dkw-foot > span { flex: 0 1 auto; min-width: 0; color: var(--dk, #5a3d4a); font-size: 13px; font-weight: 800; background: #fff; border: 2px solid var(--dk, #8d6f7f); border-radius: 999px; padding: 3px 12px; }   /* 화면을 어둡게 하지 않아서(도련 11-05) 안내는 흰 띠 위에 */
.dkw-foot > span:empty { display: none; }
.dkw-foot > span b { color: #c2457a; }
@media (max-height: 700px) { .dkw-cupart { margin-top: 110px; } .dkw-art { height: 60px; } }
.dkw-more { position: absolute; left: 18px; right: 18px; bottom: 102px; z-index: 3; height: 54px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; background: linear-gradient(transparent, var(--db) 75%); pointer-events: none; }   /* 아래에 더 있으면 끝을 서랍 색으로 흐리게 + 알림 */
.dkw-more[hidden] { display: none; }
.dkw-more > b { background: #fff; border: 2px solid var(--dk); color: var(--dk); border-radius: 999px; padding: 3px 12px; font-size: 12.5px; font-weight: 900; }
.dkw-drawer { position: relative; }
/* 🗑 버리기 (도련 11-02 · js/skins.js gdBin) */
.dkw-bin { border: 2px solid var(--dk); background: #fff; color: var(--dk); height: 30px; min-width: 30px; padding: 0 8px; border-radius: 999px; font-size: 13px; font-weight: 900; flex: none; white-space: nowrap; }
.dkw-bin.on { background: #e05a7d; border-color: #e05a7d; color: #fff; }
.dkw-drawer.binning .dkw-it { animation: dkwWig .5s ease-in-out infinite alternate; }
.dkw-drawer.binning .dkw-use { position: relative; }
.dkw-drawer.binning .dkw-use::after { content: '🗑'; position: absolute; right: 2px; top: 2px; font-size: 13px; background: #fff; border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
@keyframes dkwWig { from { transform: rotate(-1.5deg); } to { transform: rotate(1.5deg); } }
@media (prefers-reduced-motion: reduce) { .dkw-drawer.binning .dkw-it { animation: none; } }

/* ↩ 꺼낸 문구 정리 (도련 11-03 · js/deskgd.js dkwBackPaint) : 다이어리 아래 책상 위 버튼 → 카드 줄 (봉투 속처럼) → 톡 = 제자리로 */
/* 꺼낸 문구 그림 줄 (화면 아래 가운데 · 종이를 가리지 않게 · 그림 오른쪽 위 ✕ · 도련 11-05) */
.dkw-strip { position: fixed; left: 50%; bottom: 10px; translate: -50% 0; z-index: 651; display: flex; align-items: center; gap: 10px; max-width: 94vw; padding: 9px 10px 6px; border: 2.5px solid #c2457a; border-radius: 16px; background: #fffaf2; box-shadow: 3px 3px 0 #e6dcf8; overflow-x: auto; scrollbar-width: none; }
.dkw-strip[hidden] { display: none; }
.dkw-strip::-webkit-scrollbar { display: none; }
.dkw-strip .dkw-out { flex: none; position: relative; width: 38px; height: 38px; padding: 0; border: 1.6px solid #e8b9c6; border-radius: 10px; background: #fff; cursor: pointer; }
.dkw-strip .dkw-out:hover { border-color: #c2457a; background: #fff0f5; }
.dkw-strip .dkw-x { position: absolute; top: -7px; right: -7px; width: 17px; height: 17px; border-radius: 50%; background: #c2457a; color: #fff; font-size: 10px; font-weight: 900; line-height: 17px; text-align: center; box-shadow: 0 0 0 1.5px #fff; pointer-events: none; }
.dkw-out.dkw-ghost { position: fixed; z-index: 2147483000; width: 46px; height: 46px; padding: 0; translate: -50% -50%; border: 2px solid #c2457a; border-radius: 10px; background: #fff; pointer-events: none; box-shadow: 0 6px 14px rgba(90,40,60,.25); }   /* 끌어 옮기는 그림 (도련 11-05) */
.dkw-out.dkw-ghost > i { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; overflow: hidden; } .dkw-out.dkw-ghost > i img { max-width: 34px; max-height: 34px; object-fit: contain; } .dkw-out.dkw-ghost .dkw-x { display: none; }
.dkw-strip .dkw-out.dkb-out { opacity: .35; }
.dkw-t.need { animation: gdNeedTool .65s ease-in-out 4 alternate; }
.dkw-strip .dkw-out > i { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; overflow: hidden; font-style: normal; }
.dkw-strip .dkw-out > i img { max-width: 30px; max-height: 30px; object-fit: contain; }
.dkw-strip .dkw-out > i.tall img { max-width: none; max-height: none; height: 40px; width: auto; transform: rotate(-40deg); }
html:not(.desk-on) .dkw-strip { display: none !important; }
/* ✏️ 책상에서는 필기구를 책상 펜꽂이에서 뽑아요 : 그리기 펜꽂이 · 구석 작은 펜꽂이 · 안내는 안 보여요 (📝 메모 쓰기는 그대로 · js/draw.js) */
html.desk-on #pcRoom:not(.memo) .pc-cup, html.desk-on #pcRoom:not(.memo) .pc-mini, html.desk-on #pcRoom:not(.memo) .pc-tipnote { display: none !important; }
/* ✏️ 페이지에 놓은 필기구 (여러 개 · 톡 = 다시 들기 · js/draw.js pcLayDown) */
.pc-lay { position: absolute; z-index: 10040; cursor: grab; touch-action: none; transform-origin: 50% 50%; filter: drop-shadow(2px 4px 3px rgba(90, 60, 70, .25)); }
.pc-lay svg { display: block; width: 100%; height: 100%; pointer-events: none; }
html.an .pc-lay { filter: none; }

/* 🎀 마테 정리함 (도련 11-03 · js/desktape.js) : 칸마다 롤 옆모습 (그 테이프 무늬 · 남은 만큼 지름) · 앞벽이 앞 가로대 */
.dkt-rack { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.dkt-roll { position: absolute; padding: 0; border: 1.6px solid rgba(110, 70, 90, .55); border-radius: 5px / 9%; background: #fff; overflow: hidden; pointer-events: auto; cursor: pointer; box-shadow: inset -3px 0 0 rgba(255, 255, 255, .45), inset 3px 0 0 rgba(0, 0, 0, .06); }
.dkt-roll > i { position: absolute; left: 50%; top: 50%; translate: -50% -50%; background-repeat: repeat-x; background-size: auto 100%; transform: rotate(90deg); pointer-events: none; }
.dkt-roll:hover { translate: 0 -6px; }
.dkt-roll.dkt-lift { opacity: .35; }
/* 🎀 칸 고르는 창 (도련 11-04 · js/desktape.js pickSlot · 서랍장 .dkz-pick 과 같은 틀) */
.dkz-pick.dkt-pick { width: min(440px, 80vw); }
.dkt-slot { position: absolute; display: flex; align-items: flex-end; justify-content: center; padding: 0 0 4px; border: 2.5px dashed rgba(217, 79, 122, .6); border-radius: 8px; background: rgba(255, 255, 255, .5); color: #8a2f58; cursor: pointer; box-sizing: border-box; overflow: hidden; transition: background .15s, transform .15s; }
.dkt-slot b { position: relative; z-index: 1; min-width: 20px; padding: 0 4px; border-radius: 999px; background: #fffaf2; font-size: 12px; line-height: 19px; text-align: center; }
.dkt-slot:hover, .dkt-slot:focus-visible { background: rgba(255, 233, 160, .85); border: 2.5px solid #ff7eb6; transform: scale(1.05); outline: none; }
.dkt-slot.full { cursor: default; background: rgba(120, 100, 110, .2); border-style: dotted; opacity: .8; transform: none; }
.dkt-slot.full b { color: #6b5560; }
.dkt-slot > i { position: absolute; inset: 6% 10% 24%; background: center / contain no-repeat; }
.dkt-roll.dkt-pick { animation: dktPick .45s ease; }
@keyframes dktPick { 40% { translate: 0 -14px; } }
.dkt-ghost { position: fixed; z-index: 2147483000; pointer-events: none; opacity: .9; }
.dkt-front { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.dkt-front > i { position: absolute; inset: 0; -webkit-mask: var(--fm) 0 0 / 100% 100% no-repeat; mask: var(--fm) 0 0 / 100% 100% no-repeat; }
.dkt-front img { display: block; width: 100%; height: 100%; }
html.an .dkt-roll { border-color: var(--an-ol, #7a4a5a); }
.dkt-roll.dkt-out { opacity: .28; }   /* 🎀 페이지에 꺼내 둔 롤 (✕ 로 치우면 다시 · js/basket.js dsTapeOut) */
/* 🔁 꾹 잡아 옮기기 (도련 11-11 · js/deskmove.js) */
.dkm-ghost { position: fixed !important; z-index: 2147482900; translate: -50% -60%; rotate: -5deg; pointer-events: none !important; opacity: .92; filter: drop-shadow(0 8px 10px rgba(90,40,60,.3)); margin: 0 !important; right: auto !important; bottom: auto !important; }
.dkm-from { opacity: .35 !important; }
#dyModal.dkm-see > .modal-content { opacity: .18; pointer-events: none; transition: opacity .15s; }
.dkt-roll, .dk-vol, #dkwCup .dkw-t, #dkwTray .dkw-it, #dyModal .dy-it { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
/* 🎀 정리함 빈 칸 = 톡 하면 서랍에서 골라 꽂아요 (보이지 않는 칸 · 마우스를 올리면 살짝) */
.dkt-empty { position: absolute; pointer-events: auto; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: pointer; }
.dkt-empty:hover { background: rgba(255, 143, 178, .22); box-shadow: inset 0 0 0 2px rgba(255, 107, 136, .45); }
.dkt-pickl { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; max-height: 46vh; overflow: auto; }
.dkt-pickl button { width: 64px; height: 64px; padding: 4px; border: 2px solid #f0d7e1; border-radius: 50%; background: #fff; cursor: pointer; }
.dkt-pickl button:hover { border-color: #ff6b88; }
.dkt-pickl i { display: block; width: 100%; height: 100%; border-radius: 50%; background: center / cover no-repeat; }
/* ✋ 꺼내기 하나로 (도련 11-11) : 톡 = 화면 가운데로 날아와요 · 책상 위 펜꽂이 펜도 바로 · 🎀 정리함 확대 · 다이어리가 닫혀 있으면 가운데 떠 있는 손 */
html.desk-on:not(.desk-edit) .dkw-desk .dkw-t { pointer-events: auto; cursor: pointer; }
html.desk-on:not(.desk-edit) .dkw-desk .dkw-t:hover { filter: drop-shadow(0 0 3px rgba(255, 107, 136, .9)); }
.dkm-fly { pointer-events: none !important; }
.dkt-zart { position: relative; margin-top: 60px; }
.dkt-zart .dkt-zitem { position: absolute; }
.dkt-zart .dkt-zitem > img { width: 100%; height: 100%; display: block; }
.dkt-zart .dkt-roll { cursor: grab; touch-action: none; transition: translate .15s; }
.dkt-zart .dkt-roll.grab { transition: none; cursor: grabbing; }
.dkw-fl { position: fixed; z-index: 1350; width: 0; height: 0; cursor: grab; touch-action: none; }   /* ✋ 떠 있는 문구 = 쓰는 크기 · 방향 그대로 (도련 11-11 · js/deskgd.js dkwFloat) */
.dkw-fl > i { position: absolute; left: 0; top: 0; translate: -50% -50%; display: block; pointer-events: auto; filter: drop-shadow(10px 18px 9px rgba(90,60,70,.3)); animation: dkwFlBob 2.6s ease-in-out infinite; }
.dkw-fl > i svg { width: 100%; height: 100%; display: block; pointer-events: none; }
.dkw-fl.lift { cursor: grabbing; } .dkw-fl.lift > i { animation: none; }
@keyframes dkwFlBob { 50% { translate: -50% calc(-50% - 6px); } }
/* 🧺 책 바구니 확대 · ✋ 넣을 것 고르기 (도련 11-11) */
.dkb-zart { position: relative; margin-top: 40px; }
.dkb-zin { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.dkb-zin > * { position: absolute; }
.dkb-zvol { cursor: grab; touch-action: none; transition: translate .15s; z-index: 2; }
.dkm-pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; max-height: 46vh; overflow: auto; }
.dkm-pick button { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 78px; padding: 6px 4px; border: 2px solid #f0d7e1; border-radius: 14px; background: #fff; cursor: pointer; font: inherit; }
.dkm-pick button:hover { border-color: #ff6b88; }
.dkm-pick i { display: block; width: 52px; height: 52px; border-radius: 10px; background: center / contain no-repeat; }
.dkm-pick svg { height: 52px; width: auto; }
.dkm-pick small { font-size: 11px; color: #7a5a68; line-height: 1.2; }
/* 🔍 확대하는 동안 책상 위 작은 소품은 비어 있어요 · 닫으면 큰 소품이 날아가 제자리로 (도련 11-11) */
.dkz-away { visibility: hidden !important; }
.dkw-room.leaving .dkw-hint, .dkw-room.leaving .dkw-btns { opacity: 0; transition: opacity .12s; }
.dkw-fl.sel { cursor: none; z-index: 2147482990; }   /* 🖱 마우스에 붙은 문구 = 스티커 떼는 창 · 다른 창보다 위 (도련 11-13 : 창 뒤에 숨었어요) */ .dkw-fl.sel > i { pointer-events: none; animation: none; filter: drop-shadow(12px 20px 10px rgba(90,60,70,.32)); }   /* 🖱 마우스에 붙은 것 (클릭은 그 아래로) */
