/* Shared notepad - plain-text scratchpad pinned bottom-left.
   Toggle via Ctrl-Ctrl (two ctrl-down events within 400ms) or the close button.
   Loaded by TG Hub (index.html) and UGC Unicator (ugc-unicator.html).
   Persistence: localStorage key tg-notepad-content. */

#tg-notepad{
  position:fixed;
  left:16px;
  bottom:16px;
  width:340px;
  height:280px;
  min-width:240px;
  min-height:180px;
  max-width:90vw;
  max-height:90vh;
  background:var(--surface,#fff);
  border:1px solid var(--border,#E2E4EC);
  box-shadow:0 8px 24px rgba(0,0,0,.12);
  display:none;
  flex-direction:column;
  z-index:9999;
  font-family:'Source Sans Pro',system-ui,sans-serif;
  /* Resize handle at bottom-right (CSS resize needs non-visible overflow). */
  resize:both;
  overflow:hidden;
}
#tg-notepad.open{display:flex;}

#tg-notepad .tg-np-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:6px 10px;
  border-bottom:1px solid var(--border,#E2E4EC);
  background:var(--bg-2,#ECEEF5);
  flex-shrink:0;
}
#tg-notepad .tg-np-title{
  font-size:12px;
  font-weight:600;
  letter-spacing:.04em;
  color:var(--text-2,#6B6E7A);
  text-transform:uppercase;
}
#tg-notepad .tg-np-actions{
  display:flex;
  gap:4px;
  align-items:center;
}
#tg-notepad .tg-np-btn{
  background:none;
  border:none;
  cursor:pointer;
  color:var(--text-2,#6B6E7A);
  font-size:14px;
  line-height:1;
  padding:2px 6px;
  font-family:inherit;
}
#tg-notepad .tg-np-btn:hover{color:var(--text-1,#1C1C1E);}

#tg-notepad textarea{
  flex:1;
  width:100%;
  box-sizing:border-box;
  padding:10px 12px;
  border:none;
  outline:none;
  resize:none;
  font-family:'Source Sans Pro',system-ui,sans-serif;
  font-size:13px;
  line-height:1.5;
  color:var(--text-1,#1C1C1E);
  background:var(--surface,#fff);
}

#tg-notepad .tg-np-foot{
  padding:4px 10px;
  border-top:1px solid var(--border,#E2E4EC);
  font-size:10px;
  letter-spacing:.04em;
  color:var(--text-3,#9B9895);
  text-align:right;
  flex-shrink:0;
}
