/* ============================================================
   日瑩 Jocund Year — Free-placement illustration layer
   Shared across all pages (home / about / services / work / sustainability).
   Loaded after site.css. Class names kept as .jy-sv-* for continuity.
   ============================================================ */

/* the page base must be a positioning context for the absolute layer */
.jy { position: relative; }

/* layer spans the whole page; only stickers capture pointer events */
.jy-sv-freelayer { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.jy-sv-float { position: absolute; pointer-events: auto; }
/* fully transparent slot — dropped去背 PNG shows with no frame/background/ring */
.jy-sv-float image-slot { pointer-events: auto; --slot-frame-bg: transparent; --slot-ring: transparent; }

/* editing: whole frame is grabbable; controls stay visible (never vanish) */
.jy-sv-float--edit { cursor: grab; outline: 1.5px dashed rgba(31,29,26,.5); outline-offset: 0; }
.jy-sv-float--edit:hover { outline-color: var(--orange-500); }
.jy-sv-float--edit.is-dragging { cursor: grabbing; outline-color: var(--orange-500); outline-style: solid; }

.jy-sv-float__bar {
  position: absolute; left: 0; right: 0; top: -30px; height: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  pointer-events: none;
}
.jy-sv-float__grip {
  pointer-events: auto; cursor: grab; user-select: none;
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: .06em;
  padding: 4px 10px; border-radius: 999px; background: #1f1d1a; color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.22);
}
.jy-sv-float--edit.is-dragging .jy-sv-float__grip { cursor: grabbing; }
.jy-sv-float__del {
  pointer-events: auto; cursor: pointer; border: none;
  width: 24px; height: 24px; border-radius: 999px; background: var(--orange-500); color: #fff;
  font-size: 12px; line-height: 1; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.22);
}
.jy-sv-float__del:hover { background: var(--orange-600); }
.jy-sv-float__rs {
  position: absolute; right: -7px; bottom: -7px; width: 18px; height: 18px; border-radius: 5px;
  background: #fff; border: 1.5px solid #1f1d1a; cursor: nwse-resize; pointer-events: auto;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
/* locked stickers are pure display — no chrome, no pointer capture, no outline */
.jy-sv-float--locked { pointer-events: none; }

.jy-sv-toolbar {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.jy-sv-tbtn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; letter-spacing: .04em;
  padding: 12px 18px; border-radius: 999px; border: none; cursor: pointer;
  background: #1f1d1a; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.22);
  transition: transform .2s var(--ease-out), background .2s var(--ease-out);
}
.jy-sv-tbtn:hover { transform: translateY(-2px); background: var(--orange-600); }
.jy-sv-tbtn:disabled { opacity: .4; cursor: not-allowed; transform: none; background: #1f1d1a; }
.jy-sv-tbtn--lock { background: var(--orange-500); }
.jy-sv-tbtn--lock:hover { background: var(--orange-600); }
.jy-sv-tbtn--edit { background: #fff; color: #1f1d1a; border: 1.5px solid #c9c1b2; }
.jy-sv-tbtn--edit:hover { background: #1f1d1a; color: #fff; border-color: #1f1d1a; }
.jy-sv-tbtn--export { background: #1f1d1a; color: #fff; }
.jy-sv-tbtn--export:hover { background: var(--orange-500); }

@media (max-width: 720px) {
  .jy-sv-toolbar { right: 14px; bottom: 14px; }
  .jy-sv-tbtn { padding: 10px 15px; font-size: 13px; }
}
