/* stickers.css — prefix .stk- */
.stk-root { max-width: 100%; overflow-x: hidden; }
.stk-datebar { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; min-width: 0; }
.stk-datebar .stk-date { flex: 1; min-width: 0; text-align: center; font-size: 19px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* diary page */
.stk-page {
  position: relative; height: 340px; margin: 6px 4px 10px; border-radius: 10px; overflow: hidden;
  background:
    linear-gradient(90deg, transparent 34px, #ffb3c8 34px, #ffb3c8 36px, transparent 36px),
    repeating-linear-gradient(180deg, transparent 0, transparent 27px, #cfe3f7 27px, #cfe3f7 29px),
    linear-gradient(180deg, #fffdf6, #fff3fa);
  border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line), inset 0 0 18px rgba(255, 200, 230, 0.35);
  touch-action: pan-y;
}
.stk-page::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 8px;
  background: radial-gradient(circle at 50% 14px, var(--line) 0 3px, transparent 4px) 0 0 / 8px 40px repeat-y; opacity: 0.8; }
.stk-tape { position: absolute; width: 58px; height: 18px; z-index: 30; pointer-events: none; opacity: 0.85;
  background: repeating-linear-gradient(45deg, rgba(255, 190, 220, 0.9) 0 6px, rgba(255, 245, 190, 0.9) 6px 12px); box-shadow: 0 1px 2px rgba(90, 46, 94, 0.25); }
.stk-tape.a { left: -14px; top: 8px; transform: rotate(-38deg); }
.stk-tape.b { right: -14px; bottom: 8px; transform: rotate(-38deg); background: repeating-linear-gradient(45deg, rgba(180, 230, 245, 0.9) 0 6px, rgba(220, 205, 255, 0.9) 6px 12px); }
.stk-empty { position: absolute; left: 44px; right: 16px; top: 50%; transform: translateY(-50%); text-align: center; color: var(--ink-soft); font-size: 15px; line-height: 1.5; pointer-events: none; }
.stk-placed { position: absolute; display: flex; flex-direction: column; align-items: center; cursor: grab; touch-action: none; z-index: 5;
  filter: drop-shadow(0 0 0 #fff) drop-shadow(0 2px 2px rgba(90, 46, 94, 0.35)); user-select: none; -webkit-user-select: none; }
.stk-placed img { display: block; image-rendering: pixelated; pointer-events: none; -webkit-user-drag: none;
  filter: drop-shadow(1px 0 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 1px 0 #fff) drop-shadow(0 -1px 0 #fff); }
.stk-placed.drag { cursor: grabbing; filter: drop-shadow(0 6px 5px rgba(90, 46, 94, 0.4)); }
.stk-cap { margin-top: -4px; max-width: 120px; padding: 1px 8px; border-radius: 999px; border: 2px solid var(--ink); font-size: 12px; font-weight: 900; color: #fff;
  text-shadow: 1px 1px 0 rgba(90, 46, 94, 0.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stk-addrow { padding: 0 4px 6px; }

/* browser */
.stk-browser { min-width: 0; padding: 0 4px 4px; }
.stk-chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 2px 8px; margin: 0 -2px; max-width: 100%; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.stk-chips::-webkit-scrollbar { display: none; }
.stk-chip { all: unset; box-sizing: border-box; cursor: pointer; flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 12px;
  border-radius: 999px; background: #fff; border: 2px solid var(--line); box-shadow: 0 2px 0 var(--line); font-family: var(--font); font-size: 14px; font-weight: 900; color: var(--ink); transition: transform .1s; }
.stk-chip img { width: 22px; height: 22px; image-rendering: pixelated; }
.stk-chip.on { background: linear-gradient(180deg, var(--accent), var(--accent2)); border-color: var(--ink); box-shadow: 0 2px 0 var(--ink); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
.stk-chip:active { transform: scale(.94); }
.stk-chip:focus-visible { outline: 3px solid var(--accent); }
.stk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 8px; padding: 2px 0 8px; }
.stk-grid-one { display: block; }
.stk-none { text-align: center; padding: 14px 6px; }
.stk-tile { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; aspect-ratio: 1; min-height: 56px; display: flex; align-items: center; justify-content: center;
  border-radius: 16px; background: radial-gradient(circle at 30% 25%, #fff, var(--bg3) 60%, var(--bg2)); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line), 0 3px 3px rgba(90, 46, 94, .25);
  transition: transform .12s cubic-bezier(.3, 1.6, .5, 1); }
.stk-tile img { width: 44px; height: 44px; image-rendering: pixelated; filter: drop-shadow(1px 0 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 1px 0 #fff) drop-shadow(0 -1px 0 #fff); }
.stk-tile:hover, .stk-tile:focus-visible { transform: scale(1.07); outline: none; }
.stk-tile:active { transform: scale(.9); }
.stk-locked { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 12px 6px; }
.stk-locked img { width: 96px; height: 96px; object-fit: contain; }

/* modals */
.stk-modal .pmodal-body { padding: 4px 2px; }
.stk-pick { min-width: 0; }
.stk-prev { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 4px 0 10px; }
.stk-prev img { image-rendering: pixelated; filter: drop-shadow(0 2px 2px rgba(90, 46, 94, .35)); }
.stk-capwrap { min-height: 22px; }
.stk-nm { text-align: center; margin: 0 0 8px; }
.stk-row2 { display: flex; gap: 8px; justify-content: center; padding: 4px 4px 8px; flex-wrap: wrap; }
.stk-row2 .pbtn { flex: 1; min-width: 120px; }

/* editor */
.stk-editor { min-width: 0; }
.stk-canvaswrap { display: flex; justify-content: center; margin: 0 0 8px; }
.stk-canvas { display: block; border: 3px solid var(--ink); border-radius: 8px; box-shadow: 0 3px 0 var(--line); touch-action: none; cursor: crosshair; max-width: none; flex: none; }
.stk-toolrow { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 0 0 6px; flex-wrap: wrap; }
.stk-pal { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin: 0 0 8px; }
.stk-sw { all: unset; box-sizing: border-box; cursor: pointer; width: 36px; height: 36px; margin: 4px; border-radius: 10px; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); }
.stk-sw.on { box-shadow: 0 0 0 3px var(--ink); transform: scale(1.12); }
.stk-previewrow { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.stk-pvbox { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: repeating-conic-gradient(#f6eefa 0 25%, #fff 0 50%) 0 0 / 16px 16px; border: 2px solid var(--line); }
.stk-pvbox img { image-rendering: pixelated; }
