:root{
  --bg:#0f1218;
  --card:#151a22;
  --ink:#eaf2ff;
  --muted:rgba(234,242,255,.65);

  --teal:#30D5C8;
  --pink:#FF4D88;
  --yellow:#FFD700;

  --contentW: min(1100px, 92vw);

  --ui-font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --hand-font: "Segoe Print","Bradley Hand","Comic Sans MS","Chalkboard SE","Marker Felt",cursive;

  --vh: 1vh; /* fallback */
}

*{ box-sizing:border-box; }

html, body{ height:100%; }
html{ background:#0f1218; }

@supports (height: 100dvh){ :root{ --vh: 1dvh; } }
@supports (height: 100svh){ :root{ --vh: 1svh; } }

body{
  margin:0;
  font-family: var(--ui-font);

  background: url("assets/bg-office.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  color:#1a1f2b;
  position: relative;
}

.hidden{ display:none !important; }

/* White veil overlay */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.68), rgba(255,255,255,0.68));
}

/* Keep UI above veil */
.auth, .app{
  position: relative;
  z-index: 1;
}

/* =========================================================
   AUTH
========================================================= */
.auth{
  min-height: calc(var(--vh) * 100);
  display:grid;
  place-items:center;
  padding:18px;
}

.authWrap{
  width:min(900px, 94vw);
  display:flex;
  align-items:flex-end;
  justify-content:center;
  gap:0;
  margin:0 auto;
  position:relative;
  transform: translateX(90px);
}

/* HERO */
.heroWrap{
  position:relative;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  width:420px;
  margin-left:-128px;
  z-index:2;
  pointer-events:none;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,0.18));

  opacity:0;
  transform: translateY(10px) scale(0.98);
  animation: heroFadeIn 850ms ease-out 180ms forwards;
}
.heroWrap img{
  height: clamp(600px, calc(var(--vh) * 72), 840px);
  width:auto;
  transform-origin: 50% 100%;
  animation: heroIdle 6s ease-in-out 1.2s infinite;
}
@keyframes heroIdle{
  0%,100%{ transform: translateY(0px) rotate(-0.35deg); }
  50%{ transform: translateY(-2px) rotate(0.35deg); }
}
@keyframes heroFadeIn{
  to{ opacity:1; transform: translateY(0px) scale(1); }
}

.heelShadow{
  position:absolute;
  bottom:12px;
  left:50%;
  transform: translateX(-50%);
  width:170px;
  height:28px;
  background: radial-gradient(closest-side, rgba(0,0,0,0.22), transparent 70%);
  filter: blur(6px);
  opacity:.55;
}

.blinkMask{
  position:absolute;
  left:48%;
  top:18%;
  transform: translateX(-50%);
  width:30%;
  height:7%;
  border-radius:999px;
  background: rgba(0,0,0,0.22);
  opacity:0;
  mix-blend-mode:multiply;
  animation: blink 6.5s ease-in-out 2.2s infinite;
}
@keyframes blink{
  0%,94%,100%{ opacity:0; transform: translateX(-50%) scaleY(0.15); }
  95%{ opacity:0.12; transform: translateX(-50%) scaleY(1); }
}

/* Steam */
.steam{
  position:absolute;
  left:23%;
  top:10%;
  width:74px;
  height:74px;
  opacity:.55;
  transform: rotate(-8deg);
}
.steam path{
  stroke: rgba(255,255,255,0.85);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: steamUp 2.8s ease-in-out infinite;
}
.steam path:nth-child(2){ animation-delay:.25s; opacity:.75; }
.steam path:nth-child(3){ animation-delay:.5s; opacity:.6; }
@keyframes steamUp{
  0%   { stroke-dashoffset:120; opacity:0; transform: translateY(10px); }
  20%  { opacity:.6; }
  55%  { opacity:.55; }
  100% { stroke-dashoffset:0; opacity:0; transform: translateY(-12px); }
}

/* Welcome sequence */
.welcomeSeq{
  margin: 8px 0 14px;
  display:flex;
  gap:10px;
  font-weight:900;
  letter-spacing:.2px;
  color: rgba(26,31,43,.78);
}
.welcomeSeq span{
  opacity:0;
  transform: translateY(6px);
  animation: wordIn 800ms ease-out forwards;
}
.welcomeSeq .w1{ animation-delay:.15s; }
.welcomeSeq .w2{ animation-delay:.45s; }
.welcomeSeq .w3{ animation-delay:.75s; }
@keyframes wordIn{ to{ opacity:1; transform: translateY(0px); } }

/* Card */
.card{
  width:min(420px, 92vw);
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius:22px;
  padding:20px;
  position:relative;
  overflow:hidden;
  z-index:1;
  transform: translateY(-70px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12), 0 2px 10px rgba(0,0,0,0.06);
}
.card::before{
  content:"";
  position:absolute;
  inset:-80px;
  background:
    radial-gradient(380px 260px at 20% 20%, rgba(48,213,200,0.22), transparent 60%),
    radial-gradient(380px 260px at 80% 10%, rgba(255,77,136,0.18), transparent 60%);
  pointer-events:none;
}
.card > *{ position:relative; }

h1{ margin:0 0 6px; color:#1a1f2b; font-size:30px; }
.muted{ color: rgba(26,31,43,.65); margin:0; }

label{
  display:block;
  margin:10px 0;
  color: rgba(26,31,43,.65);
  font-size:14px;
}

input, textarea{
  width:100%;
  margin-top:6px;
  padding:12px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
  color:#1a1f2b;
  outline:none;

  font-family: var(--hand-font);
  font-size:16px;
  line-height:1.35;
  letter-spacing:.2px;
}
textarea{ min-height:180px; padding:14px; }
input::placeholder, textarea::placeholder{ opacity:.65; }

button{
  width:100%;
  padding:12px 14px;
  border-radius:16px;
  border:0;
  background: linear-gradient(90deg, var(--pink), var(--teal));
  color:#0b0f14;
  font-weight:900;
  cursor:pointer;
  margin-top:10px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}
button:hover{ filter: brightness(1.02); }

.msg{ margin:10px 0 0; color:#b42318; }

/* Auth padding fix */
.auth{ padding-top:48px; padding-bottom:48px; }

/* Mobile auth */
@media (max-width:900px){
  .authWrap{ flex-direction:column; gap:10px; transform:none; }
  .heroWrap{ margin-left:0; width:min(420px, 90vw); }
  .heroWrap img{ height: clamp(420px, calc(var(--vh) * 54), 560px); }
  .card{ transform:none; }
}

/* =========================================================
   APP SHELL
========================================================= */
.app{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

/* 🔥 IMPORTANT: kill “fixed position traps” */
#app, .app, main, .main{
  transform: none !important;
  filter: none !important;
  overflow: visible !important;
}

/* Center the app and stop it feeling too wide */
#app{
  width: var(--contentW);
  max-width: var(--contentW);
  margin: 0 auto;
  padding: 12px 12px 24px 12px; /* no side offset */
}


.topbar{
  position: sticky;
  top: 0;
  z-index: 7000;
  overflow: visible;

  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 14px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:rgba(21,26,34,.65);
  backdrop-filter: blur(10px);
}
.brand{ font-weight:900; letter-spacing:.2px; color: var(--ink); }
.topbar-right{ position:relative; display:flex; gap:8px; align-items:center; }

.ghost{
  width:auto;
  background:rgba(255,255,255,.12);
  color:var(--ink);
  border:1px solid rgba(255,255,255,.12);
  padding:8px 10px;
  border-radius:12px;
  cursor:pointer;
}

/* Pages */
.main{
  position:relative;
  flex:1;
  padding:16px 0 18px 0;
}
.page{ display:none; }
.page.active{ display:block; }

/* Panel */
.panel{
  position: relative;
  background: rgba(250, 248, 244, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color:#1a1f2b;
  border: 1px solid rgba(0,0,0,0.035);
  border-radius:22px;
  padding:20px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.035);
}

/* Daily header */
.dailyHead{
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;

  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex-wrap: wrap !important;

  margin: 12px 0 18px !important;
  padding-left: 6px !important;
}
.datePill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 16px;
  border-radius:999px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(0,0,0,0.14);
  box-shadow: 0 14px 28px rgba(0,0,0,0.14);
  cursor:pointer;
}
.ghost.mini, #btnToday{
  width:auto !important;
  padding:8px 12px !important;
  border-radius:999px !important;
  background: rgba(255,255,255,0.82) !important;
  border: 1px solid rgba(0,0,0,0.12) !important;
  color:#1a1f2b !important;
  box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
  font-weight:900 !important;
  letter-spacing:.2px;
}

/* Layout helpers */
.row{ display:grid; grid-template-columns:1fr; gap:18px; }
.priGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  gap: 10px 12px;
}

.priRow{display:flex;align-items:center;gap:10px}
.priRow .priDone{width:18px;height:18px;accent-color:#FF4D88}
.priRow .pri{flex:1}

@media (max-width:820px){
  .row{ grid-template-columns:1fr; }
}
@media (max-width:520px){
  .dailyHead{ gap:8px !important; padding-left:0 !important; }
}

/* =========================================================

/* =========================================================
   STICKERS (single source of truth)
========================================================= */

/* Drawer pinned to bottom (all pages) */
.stickerDrawer{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  width: var(--contentW);
  z-index: 6000;
  margin: 0;
}

.stickerToggle{
  width:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  padding:10px 14px !important;
  border-radius:14px !important;
  background: rgba(255,255,255,0.55) !important;
  color: #1a1f2b !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
  box-shadow: 0 10px 22px rgba(0,0,0,0.10) !important;
  font-weight:800 !important;
  cursor:pointer !important;
}

.stickerShelf{
  margin-top:10px;
  background: rgba(255,255,255,0.40);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius:16px;
  padding:12px;
  max-height: 34vh;
  overflow:auto;
}

.stickerPack{ margin-bottom: 12px; }
.stickerPackTitle{ font-weight: 900; margin: 6px 0 10px; color:#1a1f2b; }

.stickerGrid{
  display:grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap:10px;
}
@media (max-width: 820px){
  .stickerGrid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 520px){
  .stickerGrid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.stickerThumb{
  all: unset;
  box-sizing: border-box;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.78);
  display:grid;
  place-items:center;
  padding:8px;
  cursor: pointer;
}
.stickerThumb img{
  width: 56px;
  height: 56px;
  object-fit: contain;
  display:block;
}

.stickerPlaceholder{
  height:64px;
  border-radius:12px;
  background: rgba(255,255,255,0.55);
  border: 1px dashed rgba(0,0,0,0.10);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  opacity:.85;
}
.stickerPlaceholder.locked{ opacity:.55; }

/* Full-screen sticker stage (stickers only) */
.stickerStage{
  position: fixed;
  inset: 0;
  z-index: 5200;       /* below drawer, above content */
  pointer-events: none;
}

.placedSticker{
  position:absolute;
  width: 110px;
  transform: translate3d(0,0,0) rotate(var(--rot, 0deg));
  cursor: grab;
  user-select:none;
  touch-action:none;
  pointer-events:auto;
}
.placedSticker:active{ cursor: grabbing; }

.placedSticker img{
  width:100%;
  height:auto;
  display:block;
  pointer-events:none;
}

.placedSticker.selected{
  outline: 2px solid rgba(48,213,200,0.55);
  outline-offset: 4px;
  border-radius: 14px;
}

/* Sticker mini-controls (no resize dot) */
.stickerControls{
  position:absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -44px;
  display:flex;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 14px 28px rgba(0,0,0,0.14);
}
.stickerControls button{
  width: auto;
  margin: 0;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(21,26,34,0.12);
  border: 1px solid rgba(0,0,0,0.10);
  color:#1a1f2b;
  font-weight: 900;
  box-shadow: none;
}
.placedSticker{ position:absolute; }
.placedSticker .stickerDel{
  position:absolute;
  top:-10px; right:-10px;
  width:26px; height:26px;
  border-radius:999px;
  border:0;
  background:#fff;
  box-shadow:0 10px 24px rgba(0,0,0,0.18);
  font-weight:900;
  display:none;
  cursor:pointer;
}
.placedSticker.selected .stickerDel{ display:block; }
.drawerDragGhost{ border-radius: 12px; }
.stickerThumb{ touch-action:none; }

/* =========================================================
   DIVIDERS (single source of truth)
========================================================= */

:root{ --appMax: 1100px; }

.dividers{
  position: fixed;
  top: 130px;
  right: clamp(10px, calc(50% - (var(--appMax) / 2) - 10px), 26px);
  z-index: 7000;
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.dividers .tab{
  all: unset;
  box-sizing: border-box;
  display:grid;
  place-items:center;
  width: 44px;
  height: 92px;
  border-radius: 18px 0 0 18px;
  border: 1px solid rgba(0,0,0,0.18);
  background: rgba(255,255,255,0.92);
  color: #1a1f2b;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-weight: 900;
  letter-spacing: .2px;
  cursor: pointer;
  box-shadow: -8px 10px 24px rgba(0,0,0,0.12);
}

.dividers .tab.active{
  background: linear-gradient(180deg, var(--pink), var(--teal));
  color: #fff;
  border: none;
}
/* ✅ All main cards/panels */
.panel{
  width: var(--contentW) !important;
  max-width: var(--contentW) !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

/* ✅ Sticker drawer same width */
.stickerDrawer{
  width: var(--contentW) !important;
}

/* ✅ Sticker toggle bar same width */
.stickerToggle{
  width: 100% !important;
}

/* =========================================================
   LAYOUT CONSISTENCY
========================================================= */


/* Make sure topbar can show the VIP dropdown */
.topbar{
  width: var(--contentW);
  max-width: var(--contentW);
  margin: 0 auto;
}


/* Give space so the fixed sticker drawer doesn't cover content */
.main{ padding-bottom: 180px; }

/* Make panel a positioning parent so stickers pin to it */
.panel.pageScroll{
  position: relative;
}

/* Sticker layer covers the panel and scrolls with it */
.stickerCanvas.pinned{
  position: absolute;
  inset: 0;
  pointer-events: none; /* don't block typing/scrolling */
  z-index: 20;
}

/* Stickers remain interactive */
.stickerCanvas.pinned .sticker{
  position: absolute;
  pointer-events: auto;
  touch-action: none;
}
/* selected sticker outline */
.sticker.selected{ outline: 2px dashed rgba(0,0,0,0.25); }

/* delete button that appears on selected stickers */
.sticker .delBtn{
  position:absolute;
  top:-10px; right:-10px;
  width:28px; height:28px;
  border-radius:999px;
  border:0;
  background:#fff;
  box-shadow:0 6px 18px rgba(0,0,0,0.18);
  cursor:pointer;
  display:none;
}
.sticker.selected .delBtn{ display:block; }


/* =========================
   Babe With a Plan — FINAL UI PATCH (2026-01-08)
   One source of truth (overrides earlier rules)
========================= */

/* Stop users resizing textareas */
textarea{ resize:none !important; }

/* ---------- AUTH: fit screen (no scroll) ---------- */
.auth{ padding: 12px !important; }
.authWrap{ transform:none !important; align-items:center !important; }
.card{ transform:none !important; }
.heroWrap img{
  height: clamp(420px, calc(var(--vh) * 62), 720px) !important;
}

/* Blink should feel like a blink (quick close/open) */
.blinkMask{
  opacity:0;
  background: rgba(0,0,0,0.28) !important;
  transform: translateX(-50%) scaleY(0.12) !important;
  animation: blink2 7.2s ease-in-out 2.1s infinite !important;
}
@keyframes blink2{
  0%, 92%, 100% { opacity:0; transform: translateX(-50%) scaleY(0.12); }
  93%{ opacity:.22; transform: translateX(-50%) scaleY(1); }
  94%{ opacity:.10; transform: translateX(-50%) scaleY(0.25); }
  95%{ opacity:0; transform: translateX(-50%) scaleY(0.12); }
}

/* ---------- PAGE WIDTH CONSISTENCY ---------- */
#app{ max-width: 1100px !important; padding: 12px 12px 24px 12px !important; }
.main{
  width: var(--contentW) !important;
  max-width: var(--contentW) !important;
  margin: 0 auto !important;
  padding: 14px 0 220px 0 !important;
}


/* Daily header: one line on desktop, tidy on mobile */
.dailyHead{
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
}
.datePill{
  padding: 8px 12px !important;
  border-radius: 999px !important;
  min-width: 160px;
  justify-content:center !important;
  text-align:center !important;
}
@media (max-width: 520px){
  .dailyHead{ flex-wrap: wrap !important; }
  .datePill{ min-width: 140px; }
}

/* ---------- VIP dropdown positioning ---------- */
.vipPillPanel{
  max-width: min(320px, calc(100vw - 24px)) !important;
  right: 0 !important;
  left: auto !important;
  transform: none !important;
}
@media (max-width: 520px){
  .vipPillPanel{
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
  }
}

/* Hide VIP hint after unlock */
body[data-vip="1"] .vipHint{ display:none !important; }

/* ---------- DIVIDERS: desktop right, mobile bottom ---------- */
:root{ --appMax: 1100px; }
.dividers{
  top: 92px !important;
  right: clamp(8px, calc((100vw - var(--appMax))/2 - 10px), 22px) !important;
  max-height: calc(100vh - 120px);
  overflow:auto;
}
@media (max-width: 820px){
  .dividers{
    top: auto !important;
    bottom: 76px !important; /* above drawer */
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    flex-direction: row !important;
    gap: 8px !important;
    padding: 8px 10px !important;
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 18px;
    max-width: min(980px, 94vw);
    overflow-x:auto;
    overflow-y:hidden;
  }
  .dividers .tab{
    width: auto !important;
    height: 42px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    writing-mode: horizontal-tb !important;
    transform: none !important;
    box-shadow: 0 10px 18px rgba(0,0,0,0.10);
  }
}

/* ---------- STICKER DRAWER: always bottom ---------- */
.stickerDrawer{
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  transform: none !important;

  bottom: 12px !important;

  /* match #app inner content (12px left + 12px right) */
  width: calc(var(--contentW) - 24px) !important;
  max-width: calc(var(--contentW) - 24px) !important;
  margin: 0 auto !important;

  z-index: 9000 !important;
  background: rgba(255,255,255,0.42);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 18px;
  padding: 10px;
  backdrop-filter: blur(10px);
}

.stickerToggle{
  margin-top: 0 !important;
}
.stickerImportBar{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top: 10px;
}
.stickerImportBar input{ display:none; }
.ghost.pill{
  border-radius: 999px !important;
  padding: 8px 12px !important;
}
.stickerImportMsg{
  font-size: 12px;
  color: rgba(26,31,43,.72);
  min-height: 16px;
  flex:1;
  text-align:right;
}

/* Shelf */
.stickerShelf{
  margin-top:10px !important;
  max-height: 34vh !important;
  overflow:auto !important;
  display:grid;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 10px !important;
}

/* ✅ Ensure the drawer can actually collapse (beats any earlier display rules) */
.stickerShelf.hidden{ display:none !important; }
@media (max-width: 520px){
  .stickerShelf{ grid-template-columns: repeat(3, 1fr) !important; }
}
.stickerThumb{
  all: unset;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:center;
  height: 64px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.75);
  cursor:pointer;
}
.stickerThumb img{
  width: 46px !important;
  height: 46px !important;
  object-fit: contain !important;
  display:block;
}

/* ---------- STICKER CANVAS (per page) ---------- */
.stickerCanvas{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 40;
  pointer-events: none; /* JS toggles to auto only while sticker drawer is open */
}

.stickerCanvas.pinned{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}


.placedSticker{ pointer-events: auto; }

/* Vision: corkboard look */
.visionCanvas{
  /* Vision board keeps its own background "board" look */
  background-clip: padding-box;
  background:
    radial-gradient(circle at 10% 20%, rgba(255,255,255,0.18), transparent 35%),
    radial-gradient(circle at 80% 30%, rgba(255,255,255,0.12), transparent 40%),
    linear-gradient(135deg, rgba(199,150,102,0.92), rgba(176,124,75,0.92));
  border: 2px solid rgba(90,56,28,0.35);
  box-shadow: inset 0 0 0 10px rgba(255,255,255,0.08);
}

/* Placed sticker (image) */
.placedSticker{
  position:absolute;
  left: 20px;
  top: 20px;
  width: 120px;
  touch-action:none;
  user-select:none;
  cursor: grab;
  transform-origin: 50% 50%;
}
.placedSticker:active{ cursor: grabbing; }
.placedSticker img{
  width:100%;
  height:auto;
  display:block;
  pointer-events:none;
  -webkit-user-drag:none;
  border-radius: 10px;
}

/* Selection UI: only visible when selected */
.stickerUI{ display:none; }
.placedSticker.selected .stickerUI{ display:block; }

.handle{
  position:absolute;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.18);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  touch-action:none;
}
.handle.tl{ left:-8px; top:-8px; cursor:nwse-resize; }
.handle.tr{ right:-8px; top:-8px; cursor:nesw-resize; }
.handle.bl{ left:-8px; bottom:-8px; cursor:nesw-resize; }
.handle.br{ right:-8px; bottom:-8px; cursor:nwse-resize; }

/* Rotate handle (small curved arrow) */
.rotateHandle{
  position:absolute;
  left: 50%;
  top: -34px;
  transform: translateX(-50%);
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.18);
  box-shadow: 0 10px 22px rgba(0,0,0,0.14);
  display:grid;
  place-items:center;
  cursor: grab;
  touch-action:none;
}
.rotateHandle::before{
  content:"⟲";
  font-size: 14px;
  line-height: 1;
  color: rgba(26,31,43,0.85);
}

/* Notes page: notepad lines in editor */
.notesEditor textarea{
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(26,31,43,0.08) 0px,
    rgba(26,31,43,0.08) 1px,
    transparent 1px,
    transparent 28px
  );
  background-size: 100% 28px;
  background-position: 0 22px;
}
.panel{
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
}
.stickerDrawer{
  width: var(--contentW) !important;
  max-width: var(--contentW) !important;
}
