/* Shelf, dressed like an iOS 6 bookcase: glossy bars, real wood, linen. */
:root {
  --row: 336px;
  --plank: 190px;
  --panel: #7d5029;
  --panel-deep: #53331a;
  --blue-gloss: linear-gradient(#a5c8f6 0%, #4d8fea 50%, #2473e2 50%, #3482ee 100%);
  --red-gloss: linear-gradient(#f39aa0 0%, #dd4750 50%, #cf202c 50%, #d3303b 100%);
  --sans: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--panel); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: #fff;
  background: var(--panel);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid #8fc0ff; outline-offset: 2px; }

/* ---- navigation bar */

.navbar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 max(8px, calc((100% - 960px) / 2));
  background: linear-gradient(#a57c4e 0%, #855d34 50%, #744f29 50%, #694522 100%);
  border-bottom: 1px solid #2a1808;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 3px 7px rgba(0, 0, 0, 0.5);
}
.navbar h1 {
  position: absolute;
  left: 50%;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 44px;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
  transform: translateX(-50%);
}
.cap {
  width: 132px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.55);
}
.groove, .life {
  height: 9px;
  padding: 1px;
  border-radius: 5px;
  background: linear-gradient(#2c1a0a, #4a2f17);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.25);
}
.groove { margin-top: 5px; }
.groove i, .life i {
  display: block;
  width: 0;
  min-width: 7px;
  height: 100%;
  border-radius: 4px;
  background: var(--blue-gloss);
  box-shadow: inset 0 0 0 0.5px rgba(0, 40, 120, 0.6);
  transition: width 0.6s ease;
}
.barbtn {
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.55);
  border: 1px solid #2f1c0b;
  border-radius: 5px;
  background: linear-gradient(#94703f 0%, #72502a 50%, #5f3f1e 50%, #5a3a1b 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 0 rgba(255, 255, 255, 0.28);
}
.barbtn:active { background: linear-gradient(#5d3e1e, #4a2f15); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.28); }

/* ---- the bookcase: one bay and one plank per grid row */

.shelf {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  grid-auto-rows: var(--row);
  min-height: calc(var(--row) * 2);
  margin: 0;
  padding: 0 max(12px, calc((100% - 960px) / 2));
  list-style: none;
  background: linear-gradient(to bottom,
      #6c4421 0,
      var(--panel) 46px,
      #875a30 var(--plank),
      #d6a269 var(--plank),
      #c08a4e calc(var(--plank) + 15px),
      #f0cc9a calc(var(--plank) + 15px),
      #d9a970 calc(var(--plank) + 17px),
      #a8733c calc(var(--plank) + 18px),
      #84552b calc(var(--plank) + 40px),
      #2b1909 calc(var(--plank) + 40px),
      var(--panel-deep) calc(var(--plank) + 42px),
      #6c4421 100%) 0 0 / 100% var(--row) repeat-y;
}
.shelf::before {  /* wood grain over the whole case */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.055) 0 1px, transparent 1px 3px, rgba(255, 255, 255, 0.035) 3px 4px, transparent 4px 7px, rgba(0, 0, 0, 0.03) 7px 9px, transparent 9px 13px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.06) 0 60px, transparent 60px 170px, rgba(255, 255, 255, 0.035) 170px 260px, transparent 260px 419px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.35), transparent 7%, transparent 93%, rgba(0, 0, 0, 0.35));
}

.cell { position: relative; min-width: 0; animation: settle 0.45s cubic-bezier(0.2, 0.8, 0.3, 1.15) both; }
.cell.add { animation: none; }
@keyframes settle {
  from { opacity: 0; transform: translateY(-14px); }
}
.cell::before {  /* contact shadow on the plank */
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: calc(var(--plank) + 1px);
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6), transparent 70%);
  transition: opacity 0.25s, transform 0.25s;
}
.cell.add::before { display: none; }
.cell:hover::before { opacity: 0.5; transform: scale(0.86); }

.cell:nth-child(3n) { --tilt: -1.2deg; }
.cell:nth-child(3n + 1) { --tilt: 0.9deg; }
.cell:nth-child(5n + 2) { --tilt: -0.5deg; }

/* ---- objects standing on the plank */

.obj {
  position: absolute;
  left: 50%;
  bottom: calc(var(--row) - var(--plank) - 8px);
  display: block;
  color: inherit;
  text-decoration: none;
  transform: translateX(-50%) rotate(var(--tilt, 0deg));
  transform-origin: 50% 100%;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1.3);
  -webkit-user-drag: none;
}
.cell:hover .obj { transform: translateX(-50%) translateY(-9px) rotate(0deg); }
.obj img {
  display: block;
  max-width: 126px;
  max-height: 140px;
  -webkit-user-drag: none;
  user-select: none;
}

.print {  /* photographs */
  padding: 6px 6px 7px;
  background: linear-gradient(#ffffff, #efebe2);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.3), 0 2px 3px rgba(0, 0, 0, 0.45), 0 14px 14px -9px rgba(0, 0, 0, 0.75);
}
.print img { box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.3); }
.print::after, .film::after, .sleeve .cover::after {  /* the era's diagonal gloss */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.12) 38%, transparent 38.5%);
}
.print::after { inset: 6px 6px 7px; }

.film {  /* video stills */
  padding: 13px 5px;
  border-radius: 3px;
  background: linear-gradient(#2b2a28, #0e0d0c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 3px rgba(0, 0, 0, 0.5), 0 14px 14px -9px rgba(0, 0, 0, 0.8);
}
.film::before {
  content: "";
  position: absolute;
  inset: 3.5px 5px;
  background:
    repeating-linear-gradient(90deg, transparent 0 4px, #ddd8cc 4px 9px, transparent 9px 13px) top / 100% 6px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 4px, #ddd8cc 4px 9px, transparent 9px 13px) bottom / 100% 6px no-repeat;
  opacity: 0.85;
}
.film::after { inset: 13px 5px; }
.film .still { width: 126px; height: 72px; background: radial-gradient(circle at 30% 20%, #4b4844, #232120); }
.film .play {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border-radius: 50%;
  background: linear-gradient(rgba(90, 90, 90, 0.75), rgba(0, 0, 0, 0.75));
  box-shadow: inset 0 0 0 2px #fff, 0 1px 3px rgba(0, 0, 0, 0.6);
}
.film .play::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 10px;
  border: 6px solid transparent;
  border-left: 9px solid #fff;
  border-right: 0;
}
.badge {
  position: absolute;
  z-index: 1;
  right: 9px;
  bottom: 17px;
  padding: 1px 5px;
  border-radius: 8px;
  font: 700 9.5px var(--sans);
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.sheet {  /* documents: a small stack of paper */
  background: #fff;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.3),
    2px 2px 0 -0.5px #f4f1ea, 2px 2px 0 0 rgba(0, 0, 0, 0.28),
    4px 4px 0 -0.5px #ebe7de, 4px 4px 0 0 rgba(0, 0, 0, 0.28),
    0 16px 14px -9px rgba(0, 0, 0, 0.75);
}
.sheet.text, .sheet.blank { width: 108px; height: 140px; overflow: hidden; }
.sheet pre {
  width: 216px;
  margin: 0;
  padding: 22px 18px;
  font: 11px/1.45 var(--mono);
  color: #3a3733;
  white-space: pre;
  transform: scale(0.5);
  transform-origin: 0 0;
}
.sheet.text::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 34px;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff);
}
.sheet.blank { background: linear-gradient(#fff, #f1eee7); }
.sheet .big {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 700 21px var(--sans);
  letter-spacing: 0.02em;
  color: #c3bdb0;
  text-shadow: 0 1px 0 #fff;
}
.sheet.blank::before {  /* faint ruled lines */
  content: "";
  position: absolute;
  inset: 20px 14px;
  background: repeating-linear-gradient(to bottom, rgba(40, 90, 170, 0.13) 0 1px, transparent 1px 9px);
}
.sheet.pending .big { animation: breathe 1.2s ease-in-out infinite alternate; }
@keyframes breathe { to { opacity: 0.35; } }

.ribbon {  /* glossy corner banner */
  position: absolute;
  top: 10px;
  right: -5px;
  padding: 2px 7px;
  font: 700 9px var(--sans);
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
  background: linear-gradient(rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.08) 50%, transparent 50%), var(--ribbon, #6f7887);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), inset 0 0 0 0.5px rgba(0, 0, 0, 0.35);
}
.ribbon.red { --ribbon: #d0222c; }
.ribbon.blue { --ribbon: #2468d8; }
.ribbon.green { --ribbon: #2f9a4a; }
.ribbon.orange { --ribbon: #e8791a; }
.ribbon.violet { --ribbon: #7650c0; }

.sleeve {  /* audio: record sleeve with the disc peeking out */
  width: 116px;
  height: 116px;
  margin-left: -13px;
}
.sleeve .cover {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #5d6f8f, #1f2a44);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.55), 0 2px 3px rgba(0, 0, 0, 0.5), 0 14px 14px -9px rgba(0, 0, 0, 0.8);
}
.sleeve::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 36px;
  width: 106px;
  height: 106px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #f4efe2 0 2.5%, #d0222c 3% 17%, #0c0c0c 17.5% 19.5%, transparent 20%),
    conic-gradient(from 20deg, transparent 0 12%, rgba(255, 255, 255, 0.2) 16%, transparent 22% 62%, rgba(255, 255, 255, 0.2) 66%, transparent 72%),
    repeating-radial-gradient(circle, #151515 0 1.2px, #262626 1.2px 2.4px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  transition: transform 0.35s ease;
}
.cell:hover .sleeve::before { transform: translateX(12px) rotate(40deg); }
.sleeve img { width: 116px; height: 116px; max-width: none; max-height: none; object-fit: cover; }
.sleeve .note-glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 50px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
}
.sleeve .badge { right: 5px; bottom: 5px; }

.box {  /* archives: a taped cardboard box */
  width: 128px;
  height: 96px;
  border-radius: 1px;
  background: linear-gradient(#d3ad79, #b0854d);
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -18px 22px -14px rgba(0, 0, 0, 0.3), 0 14px 14px -9px rgba(0, 0, 0, 0.8);
}
.box::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 24px;
  margin-left: -12px;
  background: linear-gradient(90deg, rgba(246, 236, 204, 0.9), rgba(226, 211, 168, 0.72));
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}
.box::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 15px;
  height: 1px;
  background: rgba(0, 0, 0, 0.32);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}
.box .label {
  position: absolute;
  z-index: 1;
  left: 9px;
  bottom: 9px;
  padding: 3px 7px 4px;
  font: 9px/1.35 var(--sans);
  color: #3a3733;
  background: #fbf8f0;
  box-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.4);
  transform: rotate(-2deg);
}
.box .label b { display: block; font-size: 11px; }

.slot {  /* a well routed into the back panel: where the next file goes */
  width: 108px;
  height: 140px;
  border-radius: 12px;
  font-size: 54px;
  font-weight: 200;
  line-height: 1;
  color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.55);
  background: rgba(30, 14, 0, 0.3);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.65), inset 0 0 0 1px rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: color 0.2s, background-color 0.2s;
}
.slot:hover { color: #fff; background: rgba(30, 14, 0, 0.42); }
.cell.add:hover .obj { transform: translateX(-50%); }

/* ---- labels: grouped-table cells hanging under the plank */

.tag {
  position: absolute;
  left: 8px;
  right: 8px;
  top: calc(var(--plank) + 52px);
  padding: 7px 9px 8px;
  color: #000;
  border: 1px solid rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  background: linear-gradient(#ffffff, #eef0f3);
  box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(255, 255, 255, 0.28), 0 3px 6px rgba(0, 0, 0, 0.45);
}
.tag .name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}
.tag .meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 1px;
  font-size: 11px;
  line-height: 1.4;
  color: #6d6d72;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tag .time { font-weight: 700; color: #385487; }
.life {
  height: 8px;
  margin-top: 5px;
  background: linear-gradient(#b9bcc2, #dfe1e5);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45), 0 1px 0 #fff;
}
.life i { min-width: 6px; transition: width 1s linear; }
.tag .acts { display: flex; gap: 6px; margin-top: 7px; }
.tag button {
  flex: 1;
  min-width: 0;
  height: 25px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.45);
  border: 1px solid #1c479c;
  border-radius: 5px;
  background: var(--blue-gloss);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 1px 0 rgba(255, 255, 255, 0.8);
}
.tag button.remove { border-color: #8a1119; background: var(--red-gloss); }
.tag button:active { filter: brightness(0.82); }
.tag button.armed { flex: 2.2; }

/* With a pointer, a file's buttons stay tucked away until the cell is hovered. */
@media (hover: hover) {
  .cell.file .acts {
    max-height: 0;
    margin-top: 0;
    padding-bottom: 1px;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.2s ease, margin-top 0.2s ease, opacity 0.2s ease;
  }
  .cell.file:hover .acts, .cell.file:focus-within .acts {
    max-height: 30px;
    margin-top: 7px;
    opacity: 1;
  }
}

.cell.add .tag { text-align: center; }
.cell.add .meta { justify-content: center; }

.cell.late .time { color: #cf202c; }
.cell.late .life i { background: var(--red-gloss); box-shadow: inset 0 0 0 0.5px rgba(120, 0, 0, 0.6); }
.cell.up .life i {
  transition: width 0.2s linear;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.28) 0 6px, transparent 6px 12px) 0 0 / 34px 100%,
    var(--blue-gloss);
  animation: barber 0.7s linear infinite;
}
@keyframes barber { to { background-position: 17px 0, 0 0; } }
.cell.up .obj { opacity: 0.85; }
.cell.failed .time, .cell.failed .status { color: #cf202c; font-weight: 700; }

.note {
  margin: 0;
  padding: 22px 16px 40px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: #3d2410;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
  background: linear-gradient(#6c4421, var(--panel));
}

/* ---- gate: Apple's dark linen (the original 256px swatch, tiled) */

#gate {
  position: fixed;
  inset: 0;
  overflow: auto;
  background:
    radial-gradient(ellipse 130% 100% at 50% 30%, transparent 50%, rgba(0, 0, 0, 0.4)),
    #2f333b url(/linen.png) 0 0 / 256px 256px;
}
@media (min-resolution: 2dppx) {
  #gate { background-size: auto, 128px 128px; }  /* one texel per device pixel */
}
.navbar.classic {
  padding: 0 max(6px, calc((100% - 560px) / 2));
  background: linear-gradient(#b5c0d0 0%, #8b9bb5 50%, #7b8eab 50%, #6d83a1 100%);
  border-bottom: 1px solid #2d3642;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 5px rgba(0, 0, 0, 0.45);
}
.navbar.classic h1 { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); }
.barbtn.next {
  margin-left: auto;
  border-color: #233a6b;
  background: linear-gradient(#89a9e3 0%, #4f7fd6 50%, #2f65cb 50%, #3a70d2 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 0 rgba(255, 255, 255, 0.35);
}
.barbtn.next:active { background: linear-gradient(#3d5fa8, #2a4b93); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.35); }
.gate-body {
  max-width: 340px;
  margin: 0 auto;
  padding: 9vh 10px 40px;
  text-align: center;
}
.gate-body h2 {
  margin: 0 0 26px;
  font-size: 26px;
  font-weight: 700;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.65);
}
.group {
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 12px;
  color: #000;
  cursor: text;
  border: 1px solid #17191c;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.22);
}
.group span { flex: none; width: 62px; font-size: 17px; font-weight: 700; text-align: left; }
.group input {
  flex: 1;
  min-width: 0;
  padding: 0;
  font-size: 17px;
  color: #385487;
  border: 0;
  background: none;
  outline: none;
}
.group input::placeholder { color: #b3b3b8; }
.group:focus-within { box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(150, 195, 255, 0.6); }
.msg {
  min-height: 1.5em;
  margin: 14px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #ffb0a8;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
}
.hint {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: #c9ccd2;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.55);
}
#gate.shake .group { animation: shake 0.3s; }
@keyframes shake {
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* ---- alert view */

.bar-right { display: flex; gap: 6px; }
.backdrop {
  position: fixed;
  z-index: 9;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.65));
}
.alert {
  width: 100%;
  max-width: 284px;
  padding: 15px 12px 12px;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 12px;
  background:
    radial-gradient(ellipse 150% 90px at 50% -34px, rgba(255, 255, 255, 0.42) 0 64%, transparent 64.5%),
    rgba(12, 28, 66, 0.9);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 8px 26px rgba(0, 0, 0, 0.7);
  animation: pop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
@keyframes pop { from { transform: scale(0.6); opacity: 0; } }
.alert h2 { margin: 0; font-size: 18px; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.7); }
.alert p { margin: 8px 4px 10px; font-size: 13px; line-height: 1.35; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6); }
.alert input {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 7px 9px;
  font-size: 15px;
  color: #000;
  border: 1px solid #0a1630;
  border-radius: 0;
  background: #fff;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  outline: none;
}
.alert .msg { min-height: 1.35em; margin: 8px 0 6px; font-size: 13px; }
.alert-btns { display: flex; gap: 8px; }
.alert-btns button {
  flex: 1;
  height: 40px;
  font-size: 17px;
  font-weight: 700;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.7);
  border-radius: 6px;
  background: linear-gradient(rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.08) 100%), #2a3a66;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 0 rgba(255, 255, 255, 0.25);
}
.alert-btns button.primary { background: linear-gradient(rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.18) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.1) 100%), #55679a; }
.alert-btns button:active { filter: brightness(0.75); }

/* ---- drop HUD */

#drop {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
#drop span {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  width: 190px;
  height: 190px;
  font-size: 17px;
  font-weight: 700;
  text-shadow: 0 -1px 0 #000;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.74);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}
#drop span::before { content: "⬇"; font-size: 62px; line-height: 1; }
body.dragging #drop { opacity: 1; }

@media (max-width: 520px) {
  .shelf { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); padding: 0 8px; }
  .cap { width: 104px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
