/* Retro mixtape theme. Loaded last; everything is scoped to html.mixtape. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;1,9..144,400&family=Space+Mono:wght@400;700&display=swap');

html.mixtape {
  --stripe-1: #f2b33d; --stripe-2: #e07a2f; --stripe-3: #c2452d; --stripe-4: #6e3b22;
}
html.mixtape body {
  --cloth: #a8402b; --cloth2: #c25537; --gold: #e9b04a; --gold2: #f8deA4;
  --paper: #f6ecd6; --ink: #3a2a20; --muted: #9d8a6d;
  --shadow: rgba(30, 12, 4, .5); --line: rgba(242, 179, 61, .55);
  --serif: 'Fraunces', Georgia, serif; --mono: 'Space Mono', ui-monospace, monospace;
  background: radial-gradient(ellipse at 50% 12%, #4a3125 0, #2c1c14 55%, #1a100b 100%);
}
html.mixtape body:after { opacity: 0 !important; }
html.mixtape #themeBtn { display: none !important; }

/* Book frame and pages */
html.mixtape .spread { border-color: rgba(242, 179, 61, .55); box-shadow: inset 0 0 0 9px rgba(40, 14, 6, .35), inset 0 0 0 10px rgba(242, 179, 61, .25); }
html.mixtape .leaf:after { border-color: rgba(168, 64, 43, .22); }
html.mixtape .topbar { border-bottom-color: rgba(242, 179, 61, .28); }

/* Type: soft 70s serif for titles, typewriter mono for labels */
html.mixtape .title, html.mixtape .cover-title { letter-spacing: -.025em; font-weight: 600; }
html.mixtape .kicker { font: 700 11px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #b8442e; }

/* Cover: brick-red cloth with a band of 70s stripes, like a cassette J-card */
html.mixtape .leaf:has(.cover-layout),
html.mixtape .closed-cover-front {
  background:
    linear-gradient(to bottom, transparent 87%, var(--stripe-1) 87%, var(--stripe-1) 89%, var(--stripe-2) 89%, var(--stripe-2) 91%, var(--stripe-3) 91%, var(--stripe-3) 93%, var(--stripe-4) 93%, var(--stripe-4) 95%, transparent 95%),
    radial-gradient(ellipse at 50% 30%, #b84a31 0, #9c3a27 70%, #852f20 100%) !important;
}
html.mixtape .cover-title { color: #fbe7b8 !important; -webkit-text-fill-color: #fbe7b8 !important; background: none !important; text-shadow: 0 2px 0 rgba(70, 20, 8, .35); }
html.mixtape .cover-names { color: #fbe7b8; font-family: var(--mono); letter-spacing: .18em; text-transform: uppercase; font-size: 12px; }
html.mixtape .cover-sub { color: #f3c98a; }
html.mixtape .monogram {
  background: none !important; -webkit-text-fill-color: #fbe7b8 !important; color: #fbe7b8 !important;
  font-family: var(--mono) !important; letter-spacing: .3em;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
html.mixtape .monogram:before {
  content: ""; display: block; width: 96px; height: 62px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 62'%3E%3Crect x='2' y='2' width='92' height='58' rx='6' fill='%23f6ecd6' stroke='%233a2a20' stroke-width='3'/%3E%3Crect x='10' y='9' width='76' height='9' fill='%23f2b33d'/%3E%3Crect x='10' y='18' width='76' height='4' fill='%23e07a2f'/%3E%3Crect x='22' y='27' width='52' height='18' rx='9' fill='%233a2a20'/%3E%3Ccircle cx='33' cy='36' r='6' fill='%23f6ecd6'/%3E%3Ccircle cx='63' cy='36' r='6' fill='%23f6ecd6'/%3E%3Cpath d='M22 60 L28 50 H68 L74 60' fill='none' stroke='%233a2a20' stroke-width='3'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-text-fill-color: initial;
}
html.mixtape .open-book { background: linear-gradient(135deg, #f6c862, #e09a32); border-color: #fbe7b8; color: #3a1d10; font-family: var(--mono); letter-spacing: .08em; }
html.mixtape .photo-frame { border-color: #e9b04a; background: #fbf3df; }

/* Wax seal and ribbon: mustard seal on a striped 70s band */
html.mixtape .advent-ribbon {
  border-block-color: #f8dea4;
  box-shadow: 0 4px 10px rgba(60, 25, 10, .35);
  background: linear-gradient(to bottom, var(--stripe-1) 0 25%, var(--stripe-2) 25% 50%, var(--stripe-3) 50% 75%, var(--stripe-4) 75% 100%);
}
html.mixtape .advent-wax { background: radial-gradient(ellipse at 32% 22%, #fbd98a, #e0952f 68%, #a85a1d); border-color: #b86a26; color: #4a2410; }
html.mixtape .advent-crumb { background: radial-gradient(circle at 35% 30%, #fbd98a, #c06f25 70%); }
html.mixtape .advent-lock { background: radial-gradient(ellipse at 49% 40%, #fbf1dcd0, #efdcb6ee), repeating-linear-gradient(110deg, #a5734020 0 1px, transparent 1px 4px); }

/* Warm brown ink on the paper pages instead of navy */
html.mixtape .leaf .title { color: #3b2418 !important; -webkit-text-fill-color: #3b2418 !important; }
html.mixtape .leaf .body-copy, html.mixtape .leaf .subtitle { color: #4a3527; }

/* Mixtape page: cassette deck, PLAY button, track list */
.mixtape-page { width: 100%; max-width: 30em; margin: auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
.mt-deck { display: flex; flex-direction: column; align-items: center; gap: 16px; margin: 6px 0 22px; width: 100%; }
.mt-cassette { position: relative; width: min(100%, 330px); aspect-ratio: 1.6; border-radius: 14px; background: #3a2a20; box-shadow: 0 10px 24px rgba(40, 18, 8, .35), inset 0 0 0 3px #5a4130; padding: 9% 7% 0; box-sizing: border-box; }
.mt-label { background: #f6ecd6; border-radius: 6px; height: 72%; position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(58,42,32,.2); }
.mt-label:before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 30%; background: linear-gradient(to bottom, #f2b33d 0 40%, #e07a2f 40% 70%, #c2452d 70% 100%); }
.mt-label span { position: absolute; left: 0; right: 0; top: 34%; font: 700 clamp(10px, 2.6vw, 13px)/1 'Space Mono', monospace; letter-spacing: .08em; color: #3a2a20; }
.mt-window { position: absolute; left: 24%; right: 24%; top: 48%; height: 25%; background: #2a1d16; border-radius: 99px; display: flex; align-items: center; justify-content: space-between; padding: 0 7%; box-shadow: inset 0 2px 5px rgba(0,0,0,.6); }
.mt-reel { width: 28%; aspect-ratio: 1; border-radius: 50%; background: repeating-conic-gradient(#f6ecd6 0 18deg, #d9c9a8 18deg 60deg); box-shadow: 0 0 0 3px #6e3b22; position: relative; }
.mt-reel:after { content: ""; position: absolute; inset: 34%; border-radius: 50%; background: #2a1d16; }
.mt-tape { flex: 1; height: 38%; margin: 0 4%; background: linear-gradient(#5a3a28, #3a2418); border-radius: 3px; opacity: .8; }
.mt-bottom { position: absolute; left: 22%; right: 22%; bottom: 0; height: 13%; background: #4a3527; clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%); }
.mt-deck.is-playing .mt-reel { animation: mt-spin 1.6s linear infinite; }
@keyframes mt-spin { to { transform: rotate(360deg); } }
.mt-play { font: 700 13px/1 'Space Mono', monospace; letter-spacing: .14em; color: #3a1d10; background: linear-gradient(135deg, #f6c862, #e09a32); border: 1px solid #b86a26; border-radius: 99px; padding: 12px 24px; cursor: pointer; box-shadow: 0 4px 0 #a85a1d; transition: transform .1s, box-shadow .1s; }
.mt-play:active, .mt-deck.is-playing .mt-play { transform: translateY(3px); box-shadow: 0 1px 0 #a85a1d; }
.mt-play:focus-visible { outline: 2px solid #c2452d; outline-offset: 3px; }
.mt-tracks { list-style: none; margin: 0; padding: 0; width: 100%; text-align: left; display: grid; gap: 14px; }
.mt-track { border-top: 1px dashed rgba(168, 64, 43, .35); padding-top: 12px; }
.mt-track-head { display: flex; align-items: baseline; gap: 10px; }
.mt-no { font: 700 11px 'Space Mono', monospace; color: #c2452d; }
.mt-meta b { font: 600 16px/1.2 var(--serif, Georgia); color: #3b2418; display: block; }
.mt-meta span { font: 12px 'Space Mono', monospace; color: #8a6b4f; }
.mt-note { margin: 6px 0 8px 28px; font: italic 14px/1.5 var(--serif, Georgia); color: #4a3527; }
.mt-embed { display: block; width: calc(100% - 28px); margin: 0 0 8px 28px; border: 0; border-radius: 12px; }
.mt-links { margin-left: 28px; display: flex; gap: 14px; }
.mt-links a { font: 700 11px 'Space Mono', monospace; letter-spacing: .06em; color: #a8402b; text-decoration: none; border-bottom: 1px solid rgba(168, 64, 43, .4); }
@media (prefers-reduced-motion: reduce) { .mt-deck.is-playing .mt-reel { animation: none; } }
/* Compact layout so the whole Side A fits one page */
.leaf:has(.mixtape-page) { justify-content: flex-start; }
.mixtape-page .kicker { margin-bottom: 8px; }
.mt-deck { gap: 12px; margin: 0 0 14px; }
.mt-cassette { width: min(100%, 250px); }
.mt-play { padding: 10px 22px; font-size: 12px; }
.mt-tracks { gap: 9px; }
.mt-track { padding-top: 9px; }
.mt-track-head { flex-wrap: wrap; row-gap: 2px; }
.mt-meta { flex: 1; min-width: 0; }
.mt-meta b { font-size: 15px; display: inline; margin-right: 6px; }
.mt-meta span { font-size: 11px; }
.mt-links { margin: 0; gap: 10px; }
.mt-note { margin: 4px 0 0 28px; font-size: 13px; line-height: 1.45; }
.mt-embed { margin-top: 6px; }
.mt-label span { font-size: 11px; top: 32%; white-space: nowrap; }
.mt-window { top: 52%; height: 23%; }
