@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500;600;700&display=swap');

.lg-sticky-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #e4c45a;
  background: #fff1a8;
  color: #3a2a12;
  font-size: 14px;
  font-weight: 650;
  box-shadow: 0 1px 0 #fff8d2 inset;
}
.lg-sticky-btn svg { width: 16px; height: 16px; stroke-width: 1.7; }
.lg-sticky-btn:hover { background: #ffe98a; }

.lg-note {
  position: fixed;
  top: 88px;
  right: 28px;
  z-index: 40;
  width: min(360px, calc(100vw - 32px));
  min-height: 460px;
  padding: 18px 20px 16px;
  background: #ffe14d;
  color: #3a2a12;
  border-radius: 2px 14px 2px 2px;
  box-shadow: 0 16px 40px #3a2a1226, 0 2px 0 #f6d23a inset;
  transform: rotate(1.4deg);
  display: flex;
  flex-direction: column;
}
.lg-fold {
  position: absolute;
  top: 0;
  right: 0;
  width: 42px;
  height: 42px;
  background: linear-gradient(225deg, #fff 50%, #f0c72e 50%);
  border-bottom-left-radius: 6px;
  box-shadow: -2px 2px 4px #c9a22733;
}
.lg-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.lg-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
}
.lg-pin { width: 16px; height: 16px; stroke: #d23b32; fill: #d23b32; }
.lg-note p { margin: 4px 0 0; font-size: 14px; color: #6d5a32; }
.lg-pill {
  border: 0;
  background: #fff6cf;
  color: #3a2a12;
  border-radius: 999px;
  min-height: 32px;
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 1px 2px #3a2a1218;
  width: auto;
}
.lg-pill:hover { background: #fff; }
.lg-to-label {
  margin-top: 18px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}
.lg-note .lg-to {
  width: 100%;
  margin-top: 6px;
  border: 0;
  border-bottom: 2px solid #8d6b32;
  border-radius: 0;
  background: #fff6cf;
  padding: 8px 4px;
  min-height: 40px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.3;
  color: #3a2a12;
}
.lg-note .lg-lines {
  flex: 1;
  width: 100%;
  margin-top: 16px;
  min-height: 210px;
  border: 0;
  border-radius: 0;
  resize: none;
  background-color: transparent;
  background-image: repeating-linear-gradient(to bottom, transparent, transparent 31px, #c9a45a66 32px);
  background-attachment: local;
  padding: 4px 2px 0;
  font-family: Caveat, "Segoe Print", cursive;
  font-size: 26px;
  line-height: 32px;
  color: #3a2a12;
}
.lg-note .lg-lines::placeholder { color: #c2a86a; }
.lg-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.lg-count { font-size: 12px; color: #8a7344; }

#sticky-notes-root { position: fixed; inset: 0; pointer-events: none; z-index: 35; }
#sticky-notes-root .lg-note,
#sticky-notes-root .lg-received { pointer-events: auto; }

.lg-received {
  position: fixed;
  right: 24px;
  width: 230px;
  min-height: 150px;
  padding: 16px 16px 14px;
  background: #ffe14d;
  color: #3a2a12;
  border-radius: 2px;
  box-shadow: 3px 8px 18px #3a2a1224;
  transform: rotate(var(--tilt, -1.5deg));
}
.lg-received:nth-of-type(1) { top: 96px; }
.lg-received:nth-of-type(2) { top: 270px; }
.lg-received:nth-of-type(3) { top: 444px; }
.lg-received:nth-of-type(n+4) { display: none; }
.lg-received-from { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #7a6238; margin-bottom: 6px; }
.lg-received-text {
  font-family: Caveat, "Segoe Print", cursive;
  font-size: 24px;
  line-height: 1.15;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.lg-peel {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  min-height: 24px;
  border: 0;
  border-radius: 50%;
  background: #fff6cf;
  color: #3a2a12;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

@media (max-width: 720px) {
  .lg-note { top: auto; bottom: 16px; right: 16px; transform: none; min-height: 380px; }
  .lg-received { width: 180px; right: 12px; }
  .lg-sticky-btn span { display: none; }
}
