/* 13:30 · From a folder (folder.js). The markup is the end: the review
   table, priced; the four piles are under it, hidden. */

.folder .chapter-grid { min-height: 100vh; padding-block: 88px 24px; }

.org-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.org-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.folder-scene .count { font-size: 13px; color: var(--muted); }
.org-controls { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 13px; color: var(--muted); }
.org-controls .ctl { display: inline-flex; align-items: center; gap: 8px; }
.org-controls .slider { position: relative; width: 84px; height: 4px; border-radius: 2px; background: var(--line); }
.org-controls .slider i { position: absolute; left: 0; top: 0; width: 46%; height: 100%; border-radius: 2px; background: var(--accent); }
.org-controls .slider i::after { content: ""; position: absolute; right: -7px; top: -5px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(20,29,35,.35); }
.org-controls .select { padding: 4px 10px; border-radius: 8px; border: 1px solid var(--field); color: var(--ink); }
.org-controls .app-btn { height: 34px; padding: 0 12px; font-size: 13px; margin-left: auto; }

.org-stage { position: relative; height: 300px; margin-top: 16px; }

/* Four piles, each three photos fanned (the fan is CSS rotate, so GSAP's
   transform can move them freely). */
.piles {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
  opacity: 0; visibility: hidden;
}
.pile { position: relative; align-self: start; aspect-ratio: 1 / 1.3; }
.pile .photo { position: absolute; width: 74%; border: 3px solid var(--surface); border-radius: 8px; box-shadow: 0 6px 14px -8px rgba(20,29,35,.4); }
.pile .photo:nth-child(1) { left: 0; top: 0; rotate: -4deg; }
.pile .photo:nth-child(2) { left: 13%; top: 12px; rotate: 2deg; }
.pile .photo:nth-child(3) { left: 26%; top: 24px; rotate: 6deg; }
.chip-st {
  position: absolute; left: 0; top: 100%; margin-top: 10px; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px; font-size: 11px;
  background: var(--surface-2); color: var(--muted);
}
.chip-st.done { background: var(--accent-tint); color: var(--accent); }
.chip-st.busy { background: var(--accent-tint); color: var(--accent); }
.folder-scene.live .chip-st.busy { animation: org-pulse 1.4s ease-in-out infinite; }
.chip-st.fail { background: var(--warn-tint); color: var(--warn); }
@keyframes org-pulse { 50% { opacity: .45; } }

.review { position: absolute; inset: 0; width: 100%; border-collapse: collapse; font-size: 14px; }
.review th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 0 10px 8px; border-bottom: 1px solid var(--line); }
.review td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.review td:first-child { width: 52px; padding-left: 0; }
.review .photo { width: 40px; border-radius: 6px; background-size: 70%; }
.review .price { text-align: right; font-weight: 600; }
.review th.price { font-weight: 500; }

@media (max-width: 899px) {
  .folder .chapter-grid { min-height: 0; }
}
@media (max-width: 767px) {
  .org-stage { height: 470px; }
  .piles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
  .review { font-size: 13px; }
  .org-controls .app-btn { margin-left: 0; }
}
