/* The photoreal finish, carried into the tape box (and the collection and curators
   sheets, which are the same case). Surface only: it uses the textures and the key
   recipe from finish.css and changes no layout, size, timing or motion.
   Loaded after finish.css. */

/* ---- the case shell: the same matte molded plastic as the player body ---- */
.sheet--case {
  background:
    var(--scuff) 0 0 / 260px auto,
    var(--grain) 0 0 / 64px auto,
    var(--finish) 0 0 / 420px auto,
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 120px),
    radial-gradient(130% 30% at 24% 0%, rgba(255, 255, 255, 0.26), transparent 62%),
    radial-gradient(100% 30% at 100% 100%, rgba(38, 60, 88, 0.2), transparent 70%),
    linear-gradient(176deg, var(--blue-hi) 0%, var(--blue) 30%, #93adc4 68%, var(--blue-lo) 100%);
  background-blend-mode: normal, soft-light, soft-light, normal, normal, normal, normal;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 1px 0 0 rgba(255, 255, 255, 0.26),
    inset 0 -3px 0 rgba(43, 66, 94, 0.35),
    inset -9px 0 14px -6px rgba(43, 66, 94, 0.3),
    0 0 0 1px rgba(30, 45, 66, 0.35),
    0 24px 70px rgba(0, 0, 0, 0.7);
}

/* The lid, a paper title plate, brushed brass hinges. */
.sheet--case .sheet__head {
  background:
    var(--grain) 0 0 / 64px auto,
    var(--finish) 0 0 / 420px auto,
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.04) 60%, rgba(0, 0, 0, 0.08)),
    linear-gradient(176deg, var(--blue-hi), var(--blue) 60%, #93adc4);
  background-blend-mode: soft-light, soft-light, normal, normal;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 3px 0 rgba(43, 66, 94, 0.45),
    0 6px 10px rgba(23, 36, 60, 0.25);
}

.sheet--case .sheet__head::after {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 1px, rgba(0, 0, 0, 0.1) 1px 2px) left / 56px 100% no-repeat,
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 1px, rgba(0, 0, 0, 0.1) 1px 2px) right / 56px 100% no-repeat,
    repeating-linear-gradient(90deg, var(--brass-hi) 0 2px, var(--brass) 2px 12px, var(--brass-lo) 12px 14px) left / 56px 100% no-repeat,
    repeating-linear-gradient(90deg, var(--brass-hi) 0 2px, var(--brass) 2px 12px, var(--brass-lo) 12px 14px) right / 56px 100% no-repeat;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 1px 0 rgba(255, 240, 190, 0.6);
}

.sheet--case h2 {
  background:
    var(--grain) 0 0 / 40px auto,
    linear-gradient(178deg, #f7f0de, #ecdfc2);
  background-blend-mode: soft-light, normal;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -2px 3px rgba(120, 90, 50, 0.22),
    0 1px 0 rgba(23, 36, 60, 0.4),
    0 3px 5px rgba(23, 36, 60, 0.3);
  text-shadow: 0 0 0.6px rgba(23, 36, 60, 0.5);
}

/* ---- the felt-lined inside: a deeper well ---- */
.case__tray {
  background:
    var(--grain) 0 0 / 40px auto,
    radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1.4px) 0 0 / 4px 4px,
    linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0) 26px),
    var(--felt);
  background-blend-mode: soft-light, normal, normal, normal;
  box-shadow:
    inset 0 4px 10px rgba(0, 0, 0, 0.8),
    inset 3px 0 8px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(0, 0, 0, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.4),
    0 -1px 0 rgba(30, 48, 74, 0.3);
}

/* ---- tapes: paper spines in clear cases, with real edges and grain ---- */
.sheet--case .tape {
  background:
    var(--grain) 0 0 / 36px auto,
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, 0.07)),
    var(--paper);
  background-blend-mode: soft-light, normal, normal;
  box-shadow:
    inset 12px 0 0 var(--stripe),
    inset 13px 0 0 rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -2px 2px rgba(120, 90, 50, 0.16),
    0 0 0 3px rgba(255, 255, 255, 0.3),
    0 0 0 4px rgba(0, 0, 0, 0.55),
    1px 6px 6px rgba(0, 0, 0, 0.5);
}

/* ---- keys: the same dished cream plastic and brushed brass as the player ---- */
.sheet--case .btn,
.sheet--card .btn {
  position: relative;
}

.sheet--case .btn:not(.btn--plain):not(.btn--primary):not(.btn--danger),
.sheet--card .btn:not(.btn--plain):not(.btn--primary):not(.btn--danger),
.sheet--case #libraryActions .btn--primary {
  background:
    var(--stain) 30% 50% / 220px auto,
    var(--grain) 0 0 / 40px auto,
    var(--finish) 20% 40% / 240px auto,
    radial-gradient(120% 90% at 30% 16%, rgba(255, 255, 255, 0.34), transparent 58%),
    linear-gradient(180deg, var(--cream-hi) 0%, var(--cream) 48%, var(--cream-lo) 100%);
  background-blend-mode: normal, soft-light, soft-light, normal, normal;
  box-shadow:
    0 1.5px 0 #cbba90,
    0 3px 0 #b9a77c,
    0 5px 0 var(--cream-edge),
    2px 9px 9px rgba(0, 0, 0, 0.32),
    inset 0 2px 1.5px rgba(255, 255, 255, 0.85),
    inset 1px 0 2px rgba(255, 255, 255, 0.35),
    inset 0 -2px 3px rgba(125, 95, 50, 0.4),
    inset 0 0 0 1px rgba(125, 95, 50, 0.28);
  text-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.5);
}

.sheet--case .btn--primary,
.sheet--card .btn--primary {
  background:
    var(--grain) 0 0 / 40px auto,
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, rgba(0, 0, 0, 0.07) 1px 2px),
    radial-gradient(120% 90% at 30% 16%, rgba(255, 255, 255, 0.3), transparent 58%),
    linear-gradient(180deg, var(--brass-hi), var(--brass) 60%, #a8803c);
  background-blend-mode: soft-light, normal, normal, normal;
  box-shadow:
    0 3px 0 var(--brass-lo),
    2px 6px 6px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 3px rgba(80, 50, 10, 0.4),
    inset 0 0 0 1px rgba(80, 50, 10, 0.3);
}

.sheet--case .btn:not(.btn--plain)::after,
.sheet--card .btn:not(.btn--plain)::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(22% 30% at 9% 10%, rgba(255, 255, 255, 0.35), transparent 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0, transparent 30%, transparent 70%, rgba(120, 90, 50, 0.12) 100%);
}

.sheet--case .btn:active:not(:disabled):not(.btn--plain),
.sheet--card .btn:active:not(:disabled):not(.btn--plain),
.sheet--case #libraryActions .btn--primary:active:not(:disabled) {
  box-shadow:
    0 1px 0 var(--cream-edge),
    0 2px 3px rgba(0, 0, 0, 0.3),
    inset 0 2px 4px rgba(90, 65, 30, 0.35);
}

/* The round close key. */
.sheet--case .sheet__close {
  background:
    var(--grain) 0 0 / 40px auto,
    radial-gradient(circle at 35% 30%, var(--cream-hi), var(--cream) 55%, var(--cream-lo));
  background-blend-mode: soft-light, normal;
  box-shadow:
    0 1px 0 #cbba90,
    0 3px 0 var(--cream-edge),
    2px 6px 6px rgba(23, 36, 60, 0.35),
    inset 0 2px 1.5px rgba(255, 255, 255, 0.85),
    inset 0 -2px 3px rgba(125, 95, 50, 0.35);
}

/* Latches on the case's front edge: brushed brass. */
#libraryActions::before,
#libraryActions::after {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, rgba(0, 0, 0, 0.08) 1px 2px),
    linear-gradient(180deg, var(--brass-hi), var(--brass) 50%, var(--brass-lo));
  box-shadow: 0 2px 3px rgba(23, 36, 60, 0.45), inset 0 1px 0 rgba(255, 245, 205, 0.7);
}

/* The storage note: a debossed label on the case, not a link. */
#infoBtn {
  display: block;
  margin: 12px auto 4px;
  padding: 0 16px;
  min-height: 44px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(180deg, rgba(30, 50, 78, 0.18), rgba(30, 50, 78, 0.05));
  box-shadow:
    inset 0 2px 3px rgba(30, 48, 74, 0.42),
    inset 1px 0 2px rgba(30, 48, 74, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.5),
    0 -1px 0 rgba(30, 48, 74, 0.22);
  text-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.3);
}

#infoBtn span {
  text-decoration: underline;
  text-decoration-color: rgba(23, 36, 60, 0.4);
  text-underline-offset: 3px;
}
