/* Khazana v9 round 3: dark glass folders in one sliding row, and a slightly spread card deck */

/* ---------- one row of folders you slide sideways (6 in view) ---------- */
.fdk-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 8px) / 6); gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 8px; scrollbar-width: none; }
.fdk-row::-webkit-scrollbar { display: none; }
.fdk { position: relative; scroll-snap-align: start; aspect-ratio: .92; min-width: 0; border: 0; padding: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.fdk-back { position: absolute; inset: 12% 0 0; border-radius: 10px; background: linear-gradient(160deg, #2a2b30, #141518); box-shadow: 0 6px 16px rgba(0, 0, 0, .28); }
.fdk-back::before { content: ''; position: absolute; left: 0; top: -12%; width: 44%; height: 16%; border-radius: 7px 7px 0 0; background: #2a2b30; }
/* the logos sit inside the folder like papers, peeking over the front flap */
.fdk-paper { position: absolute; left: 8%; right: 8%; top: 20%; display: flex; align-items: center; gap: 4px; z-index: 1; transition: transform .35s cubic-bezier(.2, .9, .2, 1.1); }
.fdk-l { width: 34%; aspect-ratio: 1; transform: rotate(calc((var(--i) - .5) * 7deg)); }
.fdk-l .lg9 { border-radius: 8px; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.fdk-l .lg9 i { font-size: 12px; color: #26272b; }
.fdk-more { flex: none; font-size: 10px; font-weight: 700; color: #e9e9ec; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2); padding: 2px 5px; border-radius: 999px; }
.fdk:hover .fdk-paper, .fdk:focus-visible .fdk-paper { transform: translateY(-10%); }
.fdk-front { position: absolute; left: 0; right: 0; bottom: 0; height: 52%; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; gap: 1px; padding: 7px 8px; border-radius: 10px; text-align: left; min-width: 0;
  background: linear-gradient(160deg, rgba(58, 59, 66, .78), rgba(24, 25, 29, .92)); -webkit-backdrop-filter: blur(10px) saturate(150%); backdrop-filter: blur(10px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); transform-origin: 50% 100%; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.fdk:hover .fdk-front, .fdk:focus-visible .fdk-front { transform: rotateX(-12deg); }
.fdk-front b { font-size: 12px; color: #f4f4f6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fdk-front small { font-size: 10px; color: rgba(255, 255, 255, .62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fdk:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 10px; }
@media (max-width: 520px) {
  .fdk-front { padding: 5px 6px; }
  .fdk-front b { font-size: 10px; }
  .fdk-front small { display: none; }
  .fdk-more { font-size: 9px; padding: 1px 4px; }
  .fdk-l .lg9 i { font-size: 10px; }
}

/* ---------- card deck: spread a little so the cards behind show ---------- */
.dk9:not(.fan) .dk9-c { margin-left: -147px; transform-origin: 50% 120%;
  transform: translateX(calc(var(--k) * 20px)) translateY(calc(var(--k) * 3px)) rotate(calc(var(--k) * 4deg)) scale(calc(1 - var(--k) * .03)); }
.dk9:not(.fan) .dk9-c.top { transform: none; }
.dk9:not(.fan) .dk9-c.top.drag { transform: translateX(var(--dx, 0)) rotate(calc(var(--dx, 0px) / 18px * 1deg)); }
.dk9:not(.fan) .dk9-c.out-l { transform: translateX(-130%) rotate(-18deg); }
.dk9:not(.fan) .dk9-c.out-r { transform: translateX(130%) rotate(18deg); }
@media (max-width: 420px) { .dk9:not(.fan) .dk9-c { margin-left: -130px; transform: translateX(calc(var(--k) * 16px)) translateY(calc(var(--k) * 3px)) rotate(calc(var(--k) * 4deg)) scale(calc(1 - var(--k) * .03)); } }
@media (prefers-reduced-motion: reduce) { .fdk-paper, .fdk-front { transition: none; } }
