/* Decorating tray: extra categories, paper textures and the larger sticker library. */

/* The tray is taller now (group chips + a scrolling body), so leave a little more room around the page. */
.decorate .page-frame { --chrome: 458px; }
.decorate .page { --pw: min(calc(var(--appw) - 64px), calc((100dvh - var(--chrome)) * .8)); }

/* ---- tab bar: four tabs ---- */
.tray { padding: 8px 8px 8px; display: flex; flex-direction: column; }
.tray-tabs { gap: 4px; }
.tray-tabs .tab { font-size: 13.5px; padding: 0 2px; min-width: 0; }

/* ---- sticker group chips: one swipeable row ---- */
.group-chips {
  display: flex; gap: 6px; margin: 0 -8px 8px; padding: 1px 8px 2px;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding: 0 8px;
}
.group-chips::-webkit-scrollbar { display: none; }
.group-chips[hidden] { display: none; }
.group-chip {
  flex: 0 0 auto; height: 32px; padding: 0 13px; border-radius: 16px; scroll-snap-align: start;
  font: 600 12.5px/1 var(--sans); letter-spacing: .01em; white-space: nowrap; color: var(--ink);
  background: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 2px 8px rgba(48, 36, 78, .07); touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background .2s var(--ease), color .2s, box-shadow .2s, transform .2s var(--ease);
}
.group-chip:active { transform: scale(.96); }
.group-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 4px 12px rgba(30, 27, 46, .28); }
.group-chip:focus-visible, .tray-item:focus-visible, .tab:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

/* ---- scrolling item body (shows a peek of the next row so it is clear there is more) ---- */
.tray-body {
  height: 134px; overflow-y: auto; overflow-x: hidden; margin: 0 -4px; padding: 2px 4px 4px;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(30, 27, 46, .25) transparent;
  touch-action: pan-y;
}
.tray-body::-webkit-scrollbar { width: 4px; }
.tray-body::-webkit-scrollbar-thumb { background: rgba(30, 27, 46, .25); border-radius: 2px; }
.tray-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.tray-grid { gap: 7px; }
.tray-grid .tray-item[hidden] { display: none; }
.tray-item { --th: 46px; height: 60px; padding: 7px; contain: layout paint; }
.tray-item svg { width: 100%; height: var(--th); max-height: none; overflow: visible; }
.tray-item.tape { --th: 36px; height: 50px; padding: 7px 8px; }
.tray-item.doodles { --th: 38px; height: 50px; padding: 6px 8px; }
.tray-item.paper { --th: 58px; height: 62px; padding: 2px; }
.tray-item.paper svg { transform: scale(1.12); }
/* tabs without the chip row get that height back so the tray never changes size */
.tray:not([data-tab="stickers"]) .tray-body { height: 176px; }
/* realistic art already carries its own soft shadow; sticker-edge outline in the tray stays subtle */
.tray-item.stickers svg { filter: drop-shadow(0 1px 1px rgba(30, 27, 46, .18)); }
.tray-item.stickers svg.art { filter: none; }

/* ---- richer art on the page: keep the fine hairlines of the new artwork crisp ---- */
:root .deco.k-stickers svg.art *, :root .deco.k-paper svg *, :root .deco.k-tape svg * { stroke-width: revert-layer; }
.deco.k-stickers svg.art { overflow: visible; }

/* sticker outline for the die-cut look: a little softer for the realistic / editorial art */
.deco.k-paper { filter: drop-shadow(0 1px 1.5px rgba(30, 27, 46, .18)); }
.deco.k-doodles svg.art, .deco.k-doodles svg { overflow: visible; }

/* ---- premium design: dark pill chips to match its selected tab ---- */
html[data-design="premium"] .group-chip { background: transparent; border-color: rgba(27, 26, 36, .12); color: #4A4756; box-shadow: none; }
html[data-design="premium"] .group-chip.on { background: #1B1A24; color: #fff; border-color: #1B1A24; }
html[data-design="premium"] .tray-item.stickers svg.art { filter: none; }

/* ---- pop design: chunky chips ---- */
.group-chip { border-radius: 14px; }
