.ysa-sticky-note-create-btn{
  position:relative;
  flex:0 0 auto;
}

.ysa-sticky-note-count{
  position:absolute;
  top:6px;
  right:6px;
  width:6px;
  height:6px;
  overflow:hidden;
  border:1.5px solid var(--neutral-0, #fff);
  border-radius:50%;
  background:var(--brand-teal, #22b8a7);
  color:transparent;
  font-size:0;
  box-sizing:border-box;
}

.ysa-sticky-note-count[hidden]{
  display:none;
}

.ysa-sticky-notes-layer{
  position:fixed;
  z-index:34;
  pointer-events:none;
  overflow:visible;
  contain:layout style;
}

.ysa-sticky-note{
  --sticky-bg:#ffeb82;
  --sticky-ink:#342e18;
  --sticky-muted:#766a38;
  position:absolute;
  width:248px;
  min-height:218px;
  padding:18px 18px 14px;
  display:flex;
  flex-direction:column;
  border:0;
  border-radius:3px 3px 12px 3px;
  background:var(--sticky-bg);
  color:var(--sticky-ink);
  box-shadow:0 16px 30px -19px rgba(18,23,33,.58), 0 4px 8px rgba(18,23,33,.10);
  pointer-events:auto;
  box-sizing:border-box;
  transform:rotate(-.45deg);
  transform-origin:center;
  transition:box-shadow .18s ease, transform .18s ease;
}

.ysa-sticky-note:nth-child(even){
  transform:rotate(.5deg);
}

.ysa-sticky-note:hover,
.ysa-sticky-note.is-dragging{
  z-index:5;
  box-shadow:0 22px 42px -20px rgba(18,23,33,.62), 0 7px 15px rgba(18,23,33,.13);
  transform:rotate(0deg) translateY(-2px);
}

.ysa-sticky-note:after{
  content:"";
  position:absolute;
  right:0;
  bottom:0;
  width:22px;
  height:22px;
  border-radius:10px 0 10px 0;
  background:linear-gradient(135deg, rgba(255,255,255,.46) 0 49%, rgba(0,0,0,.07) 51% 100%);
  pointer-events:none;
}

.ysa-sticky-note.is-yellow{
  --sticky-bg:#ffeb82;
  --sticky-ink:#342e18;
  --sticky-muted:#766a38;
}

.ysa-sticky-note.is-pink{
  --sticky-bg:#ffc5d8;
  --sticky-ink:#482330;
  --sticky-muted:#89546a;
}

.ysa-sticky-note.is-blue{
  --sticky-bg:#bfe8ff;
  --sticky-ink:#183448;
  --sticky-muted:#4f7186;
}

.ysa-sticky-note.is-green{
  --sticky-bg:#c9efbd;
  --sticky-ink:#213c20;
  --sticky-muted:#597653;
}

.ysa-sticky-note.is-purple{
  --sticky-bg:#ddccff;
  --sticky-ink:#35264c;
  --sticky-muted:#6e5a8b;
}

.ysa-sticky-note.is-orange{
  --sticky-bg:#ffd09d;
  --sticky-ink:#4a2c14;
  --sticky-muted:#88613c;
}

.ysa-sticky-note-head{
  min-height:26px;
  margin:-8px -8px 3px;
  padding:5px 5px 2px 8px;
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--sticky-muted);
}

.ysa-sticky-note.is-editable .ysa-sticky-note-head{
  cursor:grab;
  touch-action:none;
}

.ysa-sticky-note.is-dragging .ysa-sticky-note-head{
  cursor:grabbing;
}

.ysa-sticky-note-drag-dots{
  display:flex;
  align-items:center;
  gap:3px;
  opacity:.55;
}

.ysa-sticky-note-drag-dots:before,
.ysa-sticky-note-drag-dots:after{
  content:"";
  width:3px;
  height:3px;
  border-radius:50%;
  background:currentColor;
  box-shadow:6px 0 currentColor, 12px 0 currentColor;
}

.ysa-sticky-note-privacy{
  margin-left:auto;
  display:inline-flex;
  align-items:center;
  gap:5px;
  font:650 10px/1 Geist, sans-serif;
  letter-spacing:.02em;
}

.ysa-sticky-note-action{
  width:25px;
  height:25px;
  padding:0;
  display:grid;
  place-items:center;
  border:0;
  border-radius:7px;
  background:transparent;
  color:inherit;
  cursor:pointer;
  opacity:.65;
}

.ysa-sticky-note-action:hover,
.ysa-sticky-note-action:focus-visible{
  background:rgba(255,255,255,.34);
  opacity:1;
  outline:none;
}

.ysa-sticky-note-title{
  margin:0 0 8px;
  color:var(--sticky-ink);
  font:700 30px/1.02 Caveat, "Segoe Print", cursive;
  letter-spacing:.005em;
  overflow-wrap:anywhere;
}

.ysa-sticky-note-delete-confirm{
  position:absolute;
  inset:0;
  z-index:3;
  padding:26px 22px 22px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  border-radius:inherit;
  background:var(--sticky-bg);
  color:var(--sticky-ink);
  text-align:center;
  box-sizing:border-box;
}

.ysa-sticky-note-delete-confirm[hidden]{
  display:none;
}

.ysa-sticky-note-delete-icon{
  width:34px;
  height:34px;
  margin-bottom:12px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:rgba(255,255,255,.42);
  font-size:15px;
}

.ysa-sticky-note-delete-confirm strong{
  max-width:190px;
  font:700 15px/1.35 Geist, sans-serif;
}

.ysa-sticky-note-delete-actions{
  width:100%;
  margin-top:20px;
  display:flex;
  justify-content:center;
  gap:8px;
}

.ysa-sticky-note-delete-actions button{
  min-width:88px;
  height:36px;
  padding:0 13px;
  border-radius:9px;
  font:650 11px/1 Geist, sans-serif;
  cursor:pointer;
}

.ysa-sticky-note-delete-cancel{
  border:1px solid color-mix(in srgb, var(--sticky-ink) 20%, transparent);
  background:rgba(255,255,255,.36);
  color:var(--sticky-ink);
}

.ysa-sticky-note-delete-submit{
  border:1px solid var(--sticky-ink);
  background:var(--sticky-ink);
  color:var(--sticky-bg);
}

.ysa-sticky-note-delete-actions button:hover,
.ysa-sticky-note-delete-actions button:focus-visible{
  outline:2px solid color-mix(in srgb, var(--sticky-ink) 28%, transparent);
  outline-offset:2px;
}

.ysa-sticky-note-delete-actions button:disabled{
  opacity:.58;
  cursor:wait;
}

.ysa-sticky-note-description{
  max-height:92px;
  margin:0 0 16px;
  overflow:auto;
  white-space:pre-wrap;
  color:var(--sticky-ink);
  font:480 13px/1.5 Geist, sans-serif;
  scrollbar-width:thin;
  scrollbar-color:rgba(0,0,0,.22) transparent;
}

.ysa-sticky-note-footer{
  min-height:28px;
  margin-top:auto;
  padding-top:10px;
  display:flex;
  align-items:flex-end;
  gap:9px;
  border-top:1px solid rgba(24,29,33,.13);
  border-top-color:color-mix(in srgb, var(--sticky-ink) 13%, transparent);
}

.ysa-sticky-note-author-avatar{
  width:25px;
  height:25px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  overflow:hidden;
  border-radius:50%;
  background:rgba(24,29,33,.82);
  background:color-mix(in srgb, var(--sticky-ink) 82%, transparent);
  color:#fff;
  font:700 10px/1 Geist, sans-serif;
}

.ysa-sticky-note-author-avatar img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:center;
}

.ysa-sticky-note-author{
  min-width:0;
  display:flex;
  flex-direction:column;
  color:var(--sticky-muted);
  font-family:Geist, sans-serif;
}

.ysa-sticky-note-author strong{
  overflow:hidden;
  color:var(--sticky-ink);
  font-size:11px;
  line-height:1.15;
  font-weight:700;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.ysa-sticky-note-author span{
  margin-top:2px;
  font-size:9.5px;
  line-height:1.1;
  font-weight:550;
}

.ysa-sticky-note-dialog-backdrop{
  position:fixed;
  inset:0;
  z-index:300;
  padding:24px;
  display:grid;
  place-items:center;
  background:rgba(17,24,39,.30);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
}

.ysa-sticky-note-dialog-backdrop[hidden]{
  display:none;
}

.ysa-sticky-note-dialog{
  width:min(520px, calc(100vw - 32px));
  max-height:min(760px, calc(100vh - 32px));
  overflow:auto;
  border:1px solid #e5e7eb;
  border-radius:18px;
  background:#fff;
  color:#111827;
  box-shadow:0 30px 70px -24px rgba(17,24,39,.42);
  font-family:Geist, sans-serif;
}

.ysa-sticky-note-dialog > header{
  padding:22px 24px 17px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  border-bottom:1px solid #eef0f3;
}

.ysa-sticky-note-dialog-kicker{
  display:block;
  margin-bottom:3px;
  color:#92721b;
  font-size:10px;
  line-height:1.2;
  font-weight:750;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.ysa-sticky-note-dialog h2{
  margin:0;
  color:#111827;
  font:700 20px/1.2 Geist, sans-serif;
}

.ysa-sticky-note-dialog-close{
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:8px;
  background:#f5f6f8;
  color:#596273;
  cursor:pointer;
}

.ysa-sticky-note-dialog-close:hover{
  background:#e9ebef;
  color:#111827;
}

#ysa-sticky-note-form{
  padding:20px 24px 24px;
}

.ysa-sticky-note-field{
  display:block;
  margin-bottom:17px;
}

.ysa-sticky-note-field > span,
.ysa-sticky-note-colors legend,
.ysa-sticky-note-visibility legend{
  display:block;
  margin-bottom:7px;
  color:#3e4755;
  font-size:11px;
  line-height:1.2;
  font-weight:700;
  letter-spacing:.035em;
}

.ysa-sticky-note-field input,
.ysa-sticky-note-field textarea{
  width:100%;
  border:1px solid #dfe3e9;
  border-radius:10px;
  background:#fbfbfc;
  color:#111827;
  outline:none;
  box-sizing:border-box;
}

.ysa-sticky-note-field input{
  height:43px;
  padding:0 13px;
  font:500 13px/1.4 Geist, sans-serif;
}

.ysa-sticky-note-field textarea{
  min-height:116px;
  padding:12px 13px;
  resize:vertical;
  font:450 13px/1.5 Geist, sans-serif;
}

.ysa-sticky-note-field input:focus,
.ysa-sticky-note-field textarea:focus{
  border-color:#c59a27;
  background:#fff;
  box-shadow:0 0 0 3px rgba(255,221,96,.28);
}

.ysa-sticky-note-colors,
.ysa-sticky-note-visibility{
  min-width:0;
  margin:0 0 18px;
  padding:0;
  border:0;
}

.ysa-sticky-note-colors{
  display:flex;
  align-items:flex-start;
  gap:12px;
  flex-wrap:wrap;
}

.ysa-sticky-note-colors legend{
  width:100%;
}

.ysa-sticky-note-colors label{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:5px;
  cursor:pointer;
}

.ysa-sticky-note-colors input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.ysa-sticky-note-colors label > span{
  width:30px;
  height:30px;
  display:block;
  border:2px solid #fff;
  border-radius:8px 8px 10px 8px;
  box-shadow:0 0 0 1px #d9dde4, 0 3px 7px rgba(17,24,39,.09);
  transition:transform .15s ease, box-shadow .15s ease;
}

.ysa-sticky-note-colors label > span.is-yellow{background:#ffeb82}
.ysa-sticky-note-colors label > span.is-pink{background:#ffc5d8}
.ysa-sticky-note-colors label > span.is-blue{background:#bfe8ff}
.ysa-sticky-note-colors label > span.is-green{background:#c9efbd}
.ysa-sticky-note-colors label > span.is-purple{background:#ddccff}
.ysa-sticky-note-colors label > span.is-orange{background:#ffd09d}

.ysa-sticky-note-colors input:checked + span{
  transform:translateY(-2px) rotate(-3deg);
  box-shadow:0 0 0 2px #111827, 0 6px 11px rgba(17,24,39,.16);
}

.ysa-sticky-note-colors input:focus-visible + span{
  outline:3px solid rgba(46,165,155,.28);
  outline-offset:3px;
}

.ysa-sticky-note-colors em{
  color:#667085;
  font-size:9px;
  line-height:1;
  font-style:normal;
}

.ysa-sticky-note-visibility{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
}

.ysa-sticky-note-visibility.has-global{
  grid-template-columns:repeat(3, minmax(0, 1fr));
}

.ysa-sticky-note-visibility legend{
  grid-column:1/-1;
}

.ysa-sticky-note-visibility label{
  position:relative;
  cursor:pointer;
}

.ysa-sticky-note-visibility input{
  position:absolute;
  opacity:0;
}

.ysa-sticky-note-visibility label > span{
  min-height:64px;
  padding:11px 12px 10px 38px;
  display:block;
  position:relative;
  border:1px solid #dfe3e9;
  border-radius:11px;
  background:#fbfbfc;
  box-sizing:border-box;
}

.ysa-sticky-note-visibility label i{
  position:absolute;
  top:13px;
  left:13px;
  color:#687386;
  font-size:14px;
}

.ysa-sticky-note-visibility strong,
.ysa-sticky-note-visibility small{
  display:block;
}

.ysa-sticky-note-visibility strong{
  color:#1d2531;
  font-size:12px;
  line-height:1.2;
}

.ysa-sticky-note-visibility small{
  margin-top:4px;
  color:#788293;
  font-size:9.5px;
  line-height:1.3;
}

.ysa-sticky-note-visibility input:checked + span{
  border-color:#cda641;
  background:#fff9d9;
  box-shadow:0 0 0 2px rgba(255,221,96,.22);
}

.ysa-sticky-note-visibility input:checked + span i{
  color:#8b6710;
}

.ysa-sticky-note-visibility input:focus-visible + span{
  outline:3px solid rgba(46,165,155,.28);
  outline-offset:2px;
}

.ysa-sticky-note-form-error{
  margin:0 0 14px;
  padding:9px 11px;
  border-radius:8px;
  background:#fff0f1;
  color:#a42534;
  font-size:11px;
  line-height:1.4;
}

#ysa-sticky-note-form > footer{
  padding-top:17px;
  display:flex;
  justify-content:flex-end;
  gap:9px;
  border-top:1px solid #eef0f3;
}

.ysa-sticky-note-primary,
.ysa-sticky-note-secondary{
  height:39px;
  padding:0 15px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  border-radius:9px;
  font:650 12px/1 Geist, sans-serif;
  cursor:pointer;
}

.ysa-sticky-note-primary{
  border:1px solid #111827;
  background:#111827;
  color:#fff;
}

.ysa-sticky-note-primary:hover{
  background:#273244;
}

.ysa-sticky-note-primary:disabled{
  opacity:.6;
  cursor:wait;
}

.ysa-sticky-note-secondary{
  border:1px solid #dfe3e9;
  background:#fff;
  color:#465064;
}

.ysa-sticky-note-secondary:hover{
  background:#f5f6f8;
  color:#111827;
}

.ysa-sticky-note-toast{
  position:fixed;
  left:50%;
  bottom:24px;
  z-index:320;
  max-width:min(420px, calc(100vw - 32px));
  padding:10px 15px;
  border-radius:999px;
  background:#111827;
  color:#fff;
  box-shadow:0 12px 30px -14px rgba(17,24,39,.62);
  transform:translateX(-50%);
  font:600 11px/1.35 Geist, sans-serif;
}

.ysa-sticky-note-toast[hidden]{display:none}

@media (max-width:1180px){
  .ysa-sticky-note-create-btn{
    order:1;
  }
}

@media (max-width:720px){
  .ysa-sticky-note-create-btn{
    order:1;
    width:40px;
    height:40px;
    display:grid !important;
    border:0;
    border-radius:10px;
    font-size:16px;
  }

  .ysa-sticky-note{
    width:min(270px, calc(100vw - 24px));
    min-height:210px;
  }

  .ysa-sticky-note-dialog-backdrop{
    padding:8px;
    place-items:end center;
  }

  .ysa-sticky-note-dialog{
    width:100%;
    max-height:calc(100vh - 16px);
    border-radius:18px 18px 12px 12px;
  }

  .ysa-sticky-note-dialog > header{
    padding:18px 18px 14px;
  }

  #ysa-sticky-note-form{
    padding:17px 18px max(18px, env(safe-area-inset-bottom, 18px));
  }

  .ysa-sticky-note-colors{
    gap:10px;
  }

  .ysa-sticky-note-colors label > span{
    width:28px;
    height:28px;
  }
}

@media (max-width:520px){
  .ysa-sticky-note-visibility,
  .ysa-sticky-note-visibility.has-global{
    grid-template-columns:1fr;
  }
}

@media (prefers-reduced-motion:reduce){
  .ysa-sticky-note,
  .ysa-sticky-note-colors label > span{
    transition:none;
  }
}
