/* notr demo: real notes (iframes running app/note.html) on a pretend desk.
   The desk itself (desk.js) plays the part of tools/notr/main.js. */

#desk { height: clamp(540px, 66vh, 640px); user-select: auto; -webkit-user-select: auto; }

.dnote {
  position: absolute;
  min-width: 0;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35);
  will-change: left, top;
}
.dnote iframe { display: block; width: 100%; height: 100%; border: 0; background: transparent; }

.grip { position: absolute; z-index: 2; touch-action: none; }
.grip-n, .grip-s { left: 10px; right: 10px; height: 8px; cursor: ns-resize; }
.grip-n { top: -4px; }
.grip-s { bottom: -4px; }
.grip-e, .grip-w { top: 10px; bottom: 10px; width: 8px; cursor: ew-resize; }
.grip-e { right: -4px; }
.grip-w { left: -4px; }
.grip-ne, .grip-nw, .grip-se, .grip-sw { width: 14px; height: 14px; }
.grip-ne { top: -5px; right: -5px; cursor: nesw-resize; }
.grip-sw { bottom: -5px; left: -5px; cursor: nesw-resize; }
.grip-nw { top: -5px; left: -5px; cursor: nwse-resize; }
.grip-se { bottom: -5px; right: -5px; cursor: nwse-resize; }

body.dragging { user-select: none; -webkit-user-select: none; }
.drag-shield { position: fixed; inset: 0; z-index: 9999; }

.desk-empty { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 24px; text-align: center; }
.desk-empty[hidden] { display: none; }
.desk-empty p { font-size: 15px; color: var(--strong); }
.desk-empty .btn { margin-top: 18px; }

/* the theme gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.gallery button, .gallery .own { display: flex; flex-direction: column; gap: 12px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px rgba(0, 0, 0, .45);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.gallery button:hover img { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--border), 0 26px 50px rgba(0, 0, 0, .6); }
.gallery .own-box { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; border: 1px dashed var(--border); color: var(--faint); text-align: center; font-size: 12px; transition: border-color .2s, color .2s; }
.gallery .own-box span { font: 300 42px/1 var(--font); color: var(--dim); }
.gallery .own:hover .own-box { border-color: var(--dim); color: var(--dim); }
.gallery span { display: flex; flex-direction: column; font-size: 12px; line-height: 1.5; color: var(--dim); }
.gallery span b { font-size: 13px; color: var(--strong); }

@media (max-width: 980px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) {
  #desk { height: 640px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 14px; }
  .try-head .chips { margin: 0 -16px; padding: 0 16px; width: calc(100% + 32px); }
}
