/* 12:00 · Labels: export, print, hang (labels.js). The markup is the end:
   the 00105 tag hanging on the rail beside 00106 and 00107.

   Wide: the rail across the top, the printer bottom left with the window a
   new tag rises through, the card bottom right. Narrower: the card on top,
   the rail under it, the printer bottom right. The new tag always rises
   where nothing else hangs, and 00105's place on the rail is kept clear. */

.labels .chapter-grid { min-height: 100vh; padding-block: 88px 24px; }
.labels-scene { position: relative; height: clamp(500px, calc(100vh - 128px), 580px); isolation: isolate; }

.labels-card {
  position: absolute; right: 0; bottom: 6px; z-index: 4;
  width: min(320px, 50%); padding: 18px 18px 16px;
  border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-card);
}
.lc-head { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; }
.lc-head .badge { padding: 2px 9px; border-radius: 999px; background: var(--accent-tint); color: var(--accent); font-size: 13px; }
.lc-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 4px; }
.lc-actions .app-btn { height: 42px; padding: 0 16px; font-size: 14px; }
.lc-meta { margin-top: 12px; font-size: 11px; letter-spacing: .12em; color: var(--muted); }

.file-chip {
  position: absolute; left: 24px; top: 92px; z-index: 6;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 10px; border-radius: 999px;
  background: var(--ink); color: var(--ground-morning);
  font-family: var(--font-mono); font-size: 12px; white-space: nowrap;
  box-shadow: 0 10px 24px -12px rgba(20,29,35,.6);
  opacity: 0; visibility: hidden;
}
.labels-card ~ .file-chip { left: auto; right: 150px; top: auto; bottom: 70px; }
.file-chip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }

/* A thermal label printer, front view. */
.printer { position: absolute; left: 0; bottom: 0; z-index: 3; width: 250px; height: 132px; }
.pr-top { position: absolute; left: 0; right: 0; top: 0; height: 40px; border-radius: 22px 22px 6px 6px; background: #3A4248; }
.pr-slot { position: absolute; left: 34px; right: 34px; top: 30px; height: 6px; border-radius: 3px; background: #11161A; }
.pr-front {
  position: absolute; left: 0; right: 0; top: 34px; bottom: 0;
  border-radius: 6px 6px 22px 22px; background: #2C3338;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 30px 40px -24px rgba(20,29,35,.55);
}
.pr-led { position: absolute; right: 26px; bottom: 26px; width: 8px; height: 8px; border-radius: 50%; background: #57B98A; box-shadow: 0 0 8px #57B98A; }

/* The window above the slot that a freshly printed tag rises through. */
.feed {
  position: absolute; z-index: 2; left: 55px; bottom: 102px; width: 140px; height: 220px;
  overflow: hidden; pointer-events: none; --tag-w: 112px;
}
.feed .tag { position: absolute; left: 50%; bottom: 0; margin-left: calc(var(--tag-w) / -2); visibility: hidden; }

.labels-rail { position: absolute; left: 0; right: 0; top: 0; z-index: 2; height: 320px; --tag-w: 112px; }
.labels-rail .carry { display: block; }
.labels-rail .hang[data-no="00106"] { --x: 18%; }
.labels-rail .hang[data-no="00107"] { --x: 46%; }
.labels-rail .hang[data-no="00105"] { --x: 80%; }

@media (max-width: 1199px) {
  .labels .chapter-grid { padding-block: 80px 16px; }
  .labels-scene { height: clamp(560px, calc(100vh - 110px), 680px); }
  .labels-card { right: auto; bottom: auto; left: 0; top: 0; width: min(360px, 100%); }
  .labels-card ~ .file-chip { right: auto; left: 20px; top: 70px; bottom: auto; }
  .labels-rail { top: 150px; height: 300px; --tag-w: 100px; }
  .labels-rail .hang[data-no="00106"] { --x: 14%; }
  .labels-rail .hang[data-no="00107"] { --x: 42%; }
  .printer { left: auto; right: 0; width: 200px; height: 112px; }
  .feed { left: auto; right: 40px; width: 120px; bottom: 82px; height: 200px; --tag-w: 100px; }
}
@media (max-width: 899px) {
  .labels .chapter-grid { min-height: 0; }
}
@media (max-width: 767px) {
  .labels-scene { height: 600px; }
  .labels-rail { --tag-w: 92px; }
  .feed { right: 30px; width: 110px; --tag-w: 92px; }
}
