/* ---------- floppy disk carousel ---------- */

.carousel {
  display: grid;
  grid-template-columns: repeat(auto-fill, 108px);
  justify-content: start;
  gap: 18px 16px;
  padding: 10px 6px 18px;
}

.carousel.has-active .floppy:not(.active) {
  opacity: .35;
  filter: grayscale(.6);
}

.floppy {
  width: 108px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--mono);
  color: var(--ink);
  transition: opacity .3s ease, filter .3s ease, transform .25s ease;
}
.floppy:hover .floppy-body { transform: translateY(-3px); box-shadow: 0 8px 14px rgba(0,0,0,.5); }
.floppy:focus-visible { outline: 2px solid var(--phosphor); outline-offset: 3px; }

.floppy-body {
  position: relative;
  width: 108px;
  height: 108px;
  background: linear-gradient(155deg, #2c2c2c, #1a1a1a 60%, #111);
  border-radius: 3px;
  box-shadow: 0 4px 8px rgba(0,0,0,.45), inset 0 0 0 1px #000;
  transition: transform .2s ease, box-shadow .2s ease;
}

/* notched top-left corner, classic 3.5" shape */
.floppy-body::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 22px; height: 14px;
  background: var(--bg);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

/* metal shutter */
.floppy-shutter {
  position: absolute;
  left: 10px; right: 10px; top: 8px;
  height: 30px;
  background: linear-gradient(180deg, #c9c9ca, #8f9092 55%, #6c6d6f);
  border-radius: 1px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -2px 3px rgba(0,0,0,.35);
}
.floppy-shutter::after {
  content: "";
  position: absolute;
  right: 8px; top: 6px; bottom: 6px;
  width: 34%;
  background: #3a3a3c;
  border-radius: 1px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.6);
}

/* write-protect notch */
.floppy-body .wp-notch {
  position: absolute;
  right: 9px; top: -1px;
  width: 8px; height: 5px;
  background: #050505;
  border-radius: 0 0 2px 2px;
}

/* paper label — hand-written sticker feel */
.floppy-label {
  position: absolute;
  left: 9px; right: 9px; bottom: 10px;
  top: 46px;
  background: #ded9c4;
  border: 1px solid #b8b29a;
  border-radius: 1px;
  transform: rotate(-0.6deg);
  box-shadow: 0 1px 2px rgba(0,0,0,.3);
  padding: 6px 6px 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
}
.floppy-label::before {
  content: "";
  position: absolute;
  left: 6px; right: 6px; top: 21px;
  height: 1px;
  background: repeating-linear-gradient(90deg, #a89f80 0 4px, transparent 4px 7px);
}
.floppy-label .hand-title {
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1;
  color: #2b2a20;
  letter-spacing: .5px;
}
.floppy-label .hand-sub {
  font-family: var(--mono);
  font-size: 13px;
  color: #55503e;
  letter-spacing: .5px;
}

.floppy.active .floppy-body {
  box-shadow: 0 0 0 2px var(--phosphor), 0 4px 12px rgba(0,0,0,.5);
}

/* insert animation: disk lifts, shrinks, and fades toward the drive slot */
.floppy.inserting .floppy-body {
  animation: insert-disk .5s cubic-bezier(.5,0,.35,1) forwards;
}
@keyframes insert-disk {
  0%   { transform: translateY(0) scale(1); opacity: 1; }
  70%  { transform: translateY(-52px) scale(.55); opacity: .7; }
  100% { transform: translateY(-70px) scale(.3); opacity: 0; }
}

/* ---------- disk contents panel ---------- */

.contents-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px 14px;
  animation: reveal-panel .35s ease both;
}
@keyframes reveal-panel {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.contents-title {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--chrome);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--phosphor);
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

.contents-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 340px;
  overflow-y: auto;
}
.contents-list::-webkit-scrollbar { width: 8px; }
.contents-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

.content-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 3px;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
}
.content-row:hover { background: var(--panel2); }
.content-row.active {
  background: var(--panel2);
  border-color: var(--phosphor-dim);
}
.content-row .idx { color: var(--ink-dim); font-size: 15px; }
.content-row .name { color: var(--ink); font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content-row.active .name { color: var(--phosphor); }
.content-row .fmt {
  font-family: var(--chrome);
  font-size: 8px;
  letter-spacing: .5px;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  padding: 3px 5px;
  border-radius: 2px;
  white-space: nowrap;
}
