/* 🍽 오늘 쓸 스티커 (도련 11-01 · js/stktray.js) : 📱 폰만 (11-13 · 💻 📲 책상은 영구 삭제) · 고르는 화면 + 아래 메뉴 줄 버튼 · 은빛 쟁반 */
.stp { position: fixed; inset: 0; z-index: 1450; display: none; flex-direction: column; background: #fff8f1 radial-gradient(#f6e3ea 1.5px, transparent 1.6px) 0 0 / 20px 20px; color: #5b3240; }
.stp.show { display: flex; animation: crIn .2s ease both; }
.stp button { font-family: inherit; cursor: pointer; }
.stp-bar { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; }
.stp-bar b { font-size: 22px; color: #c2457a; }
.stp-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 22px; padding: 0 22px 22px; }
.stp-l { min-height: 0; display: flex; flex-direction: column; gap: 12px; background: #fffdfb; border: 2.5px solid #f2c9d6; border-radius: 22px; padding: 14px; box-shadow: 0 6px 18px rgba(194, 69, 122, .08); }
.stp-kinds { flex: none; display: flex; flex-wrap: wrap; gap: 8px; }
.stp-k { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 2px solid #f2c9d6; background: #fff; color: #9a6a7d; font-weight: 800; font-size: 14px; }
.stp-k small { min-width: 18px; padding: 0 6px; border-radius: 999px; background: #fde7ef; color: #c2457a; font-size: 11px; line-height: 18px; text-align: center; }
.stp-k.on { background: #ffe0ea; border-color: #e88fb0; color: #c2457a; }
.stp-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; align-content: start; padding: 4px; scrollbar-width: thin; }
.stp-empty { grid-column: 1 / -1; margin: 40px 0; text-align: center; color: #b08a9a; font-size: 15px; line-height: 1.7; }
.stp-c { position: relative; touch-action: none; cursor: grab; transition: transform .12s; }
.stp-c:hover { transform: translateY(-3px); }
.stp-c .bk-sh { position: relative !important; left: auto; top: auto; width: 100% !important; max-width: none; transform: none; pointer-events: none; }
/* 은빛 쟁반 : 평평하고 넓고 끝이 둥근 */
.stp-r { min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.stp-tray, .dtr-tray { position: relative; border-radius: 46px; padding: 18px; background: linear-gradient(160deg, #fbfcfd 0%, #e3e8ee 38%, #c9d0d8 62%, #eef1f4 100%);
    box-shadow: inset 0 2px 0 #fff, inset 0 -3px 0 rgba(120, 130, 145, .35), 0 10px 22px rgba(90, 100, 120, .25), 0 0 0 2px #b9c1cb; }
.stp-tray::before, .dtr-tray::before { content: ''; position: absolute; inset: 12px; border-radius: 36px; background: linear-gradient(160deg, #eef2f5, #d9dfe5 60%, #e9edf1); box-shadow: inset 0 3px 8px rgba(110, 120, 135, .35), inset 0 -1px 0 #fff; pointer-events: none; }
.stp-tray { flex: 1; min-height: 0; }
.stp-tin, .dtr-in { position: relative; z-index: 1; height: 100%; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; align-content: start; padding: 14px; box-sizing: border-box; scrollbar-width: thin; }
.stp-hint { grid-column: 1 / -1; margin: 60px 0; text-align: center; color: #7b8592; font-weight: 800; line-height: 1.7; }
.stp-note { flex: none; margin: 0; padding: 12px 16px; border-radius: 16px; background: #fff; border: 2px dashed #f2bfd0; font-size: 14px; line-height: 1.65; color: #7a5566; word-break: keep-all; }
.stp-note b { color: #c2457a; }
.stp-go { flex: none; padding: 14px; border-radius: 16px; border: 2px solid #e88fb0; background: #ffe0ea; color: #c2457a; font-size: 19px; font-weight: 900; box-shadow: 0 4px 0 #f0b6c8; }
.stp-go:active { translate: 0 2px; box-shadow: 0 2px 0 #f0b6c8; }

/* 🍽 버튼 · 쟁반 */
.dtr-btn { position: fixed; top: max(14px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 995; }   /* 가운데는 transform 으로 (누를 때 translate 가 바뀌어도 안 튀게) */
.dtr-btn[hidden] { display: none; }
.dtr-btn { gap: 10px; }
.dtr-sw { position: relative; flex: none; width: 40px; height: 22px; border-radius: 11px; background: #e6d3da; transition: background .15s; }   /* 🔘 켜짐 · 꺼짐 스위치 */
.dtr-sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: left .15s; }
.dtr-btn.on .dtr-sw { background: #ff6a8a; }
.dtr-btn.on .dtr-sw::after { left: 21px; }
.dtr-pn { position: fixed; left: 18px; top: 70px; z-index: 996; width: 440px; max-width: calc(100vw - 36px); display: flex; flex-direction: column; gap: 8px; }
.dtr-pn[hidden] { display: none; }
.dtr-hd { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 6px 10px; border-radius: 999px; background: #fff; border: 2px solid #e88fb0; cursor: grab; touch-action: none; user-select: none; color: #c2457a; font-size: 15px; }
.dtr-hd small { color: #b08a9a; font-size: 11px; font-weight: 700; }
.dtr-tray { height: min(36vh, 290px); }   /* 평평하고 넓은 쟁반 */
.dtr-in { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; }
.dtr-in .stp-c { cursor: pointer; }
.dtr-ft { display: flex; gap: 6px; justify-content: center; }
.dtr-mini { padding: 6px 12px; border-radius: 999px; border: 2px solid #e2c4cf; background: #fff; color: #9a6a7d; font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; }
/* 장소 · 가게 · 고르는 화면에서는 숨겨요 */
body.cal-on .dtr-btn, body:has(.shop-scene.on) .dtr-btn, body:has(#stkPick.show) .dtr-btn,
body.cal-on .dtr-pn, body:has(.shop-scene.on) .dtr-pn, body:has(#stkPick.show) .dtr-pn { display: none; }
/* 💻 📲 책상 = 오늘 쓸 스티커 없음 (도련 11-13 · 📔 다이어리모드로 충분) */
html.desk-on .stk-sub, html.desk-on #stkPick, html.desk-on .dtr-btn, html.desk-on .dtr-pn { display: none !important; }

/* 🍽 스티커 창 '오늘 쓸 스티커' 버튼 · 쟁반 버튼 = 아래 메뉴 줄 끝 */
.stk-sub { display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; margin: 10px auto 2px; padding: 0 18px; border: 1.6px solid #e8bfd2; border-radius: 18px; background: #fff; color: #c8457a; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.stk-sub:hover { border-color: #e07ba0; background: #fff4f8; }
.toolbar .dtr-btn { position: static; transform: none; align-self: center; flex: none; height: 40px; padding: 0 14px; font-size: 14px; }   /* ▤ 하단 메뉴 = 아래 메뉴 줄 끝 */
.stk-acts { display: contents; }   /* 💻 📲 = 두 버튼 위아래 그대로 */
.dtr-lbs, .dtr-x, .dtr-grip { display: none; }

/* 📱 폰 (도련 11-12 : 하단 = 편의 · 깔끔하게) */
html.is-phone .stk-acts { display: flex; gap: 8px; margin: 20px 8px 4px; }
html.is-phone .stk-acts .dk-cta { flex: 1.15; width: auto; margin: 0; height: 46px !important; font-size: 15.5px !important; gap: 4px; padding: 0 6px; }
html.is-phone .stk-acts .dk-cta-ico { width: 24px; height: 24px; }
html.is-phone .stk-acts .stk-pc { display: none; }   /* '나만의' 빼고 '스티커 만들기' */
html.is-phone .stk-acts .stk-sub { flex: 1; height: 46px; margin: 0; padding: 0 6px; border-radius: 14px; font-size: 15px; white-space: nowrap; }
/* 고르는 화면 = 위 종류 · 목록 / 아래 넓은 쟁반 (여러 줄 · 넘겨 보기) · 담기 · 톡만 (손가락으로 넘겨요) */
html.is-phone .stp-bar { padding: 10px 14px; }
html.is-phone .stp-bar b { font-size: 18px; }
html.is-phone .stp-body { display: flex; flex-direction: column; gap: 8px; padding: 0 10px max(10px, env(safe-area-inset-bottom)); }
html.is-phone .stp-l { flex: 1 1 50%; padding: 10px; border-radius: 18px; gap: 10px; }
html.is-phone .stp-kinds { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
html.is-phone .stp-k { flex: none; padding: 6px 12px; font-size: 13px; }
html.is-phone .stp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; touch-action: pan-y; }
html.is-phone .stp-c { touch-action: pan-x pan-y; cursor: pointer; }
html.is-phone .stp-c:hover { transform: none; }
html.is-phone .stp-c:active { transform: scale(.94); }
html.is-phone .stp-r { flex: 1 1 42%; min-height: 0; gap: 8px; }
html.is-phone .stp-note { padding: 6px 12px; font-size: 12.5px; text-align: center; border-radius: 12px; }
html.is-phone .stp-tray { flex: 1; min-height: 0; padding: 10px; border-radius: 30px; }
html.is-phone .stp-tray::before { inset: 8px; border-radius: 24px; }
html.is-phone .stp-cnt { position: absolute; z-index: 2; left: 50%; top: 2px; translate: -50% 0; padding: 1px 10px; border-radius: 99px; background: #fff; color: #c2457a; font-size: 11.5px; white-space: nowrap; box-shadow: 0 1px 3px rgba(90,100,120,.25); }
html.is-phone .stp-cnt:empty { display: none; }
html.is-phone .stp-tin { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 12px 10px; touch-action: pan-y; }
html.is-phone .stp-hint { margin: 30px 0; font-size: 13px; }
html.is-phone .stp-go { flex: none; padding: 11px; font-size: 17px; }
/* 다꾸할 때 쟁반 = 처음엔 아래 메뉴 줄 바로 위 · 머리(손잡이)를 잡고 위아래로 · 스티커 줄은 옆으로 넘겨요 · ✕ = 접기 */
html.is-phone .toolbar .dtr-btn { height: 36px; padding: 0 10px; gap: 6px; font-size: 13px; }
html.is-phone .dtr-lb { display: none; } html.is-phone .dtr-lbs { display: inline; }
html.is-phone .dtr-pn { left: 6px !important; right: 6px; width: auto; max-width: none; gap: 4px; }
html.is-phone .dtr-hd { position: relative; cursor: grab; padding: 9px 40px 5px; font-size: 13px; }
html.is-phone .dtr-hd small { display: none; }
html.is-phone .dtr-grip { display: block; position: absolute; left: 50%; top: 3px; translate: -50% 0; width: 36px; height: 4px; border-radius: 2px; background: #e8b4c7; }   /* 잡는 곳 표시 */
html.is-phone .dtr-x { display: block; position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #ffe0ea; color: #c2457a; font: inherit; font-size: 13px; font-weight: 900; cursor: pointer; }
html.is-phone .dtr-tray { height: 112px; padding: 8px; border-radius: 28px; }
html.is-phone .dtr-tray::before { inset: 7px; border-radius: 22px; }
html.is-phone .dtr-in { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 6px 12px; align-items: center; touch-action: pan-x; }
html.is-phone .dtr-in .stp-c { flex: none; width: 72px; touch-action: pan-x; }
html.is-phone .dtr-ft { gap: 6px; }
