/* Library materials: retain book/DVD dimensions, transforms, hit areas and TV screen. */
html.grunge-site .page-timeline {
  --media-paper: var(--gr-paper-light);
  --media-ink: var(--gr-ink);
}

/* Existing physical television: worn charcoal cabinet and printed control plate. */
html.grunge-site .page-timeline .music-tv {
  background: var(--gr-texture), linear-gradient(140deg, #374032, #171915 65%, #4b372c);
  border: 3px solid #080a08;
  border-top: 8px solid var(--gr-red);
  border-radius: 2px;
  box-shadow: 9px 11px 0 #050605, inset 0 1px #af8e7780;
}
html.grunge-site .page-timeline .music-tv-screen { border-color: #080a08; border-radius: 2px; }
html.grunge-site .page-timeline .music-tv-controls {
  color: var(--media-ink); background: var(--gr-paper-texture);
  border: 2px solid #080a08; border-bottom: 4px solid var(--gr-red);
  box-shadow: 3px 4px #080a08; margin-top: 12px; padding: 10px;
}
html.grunge-site .page-timeline .music-tv-controls > span { font: 800 .65rem/1.2 var(--gr-mono); }
html.grunge-site .page-timeline .music-tv-title { color: var(--media-ink); font-family: var(--gr-condensed); font-weight: 900; }
html.grunge-site .page-timeline .music-tv-controls button {
  color: var(--media-paper); background: var(--gr-ink); border: 2px solid var(--gr-ink);
  box-shadow: 2px 3px #af8e77;
}
html.grunge-site .page-timeline .music-tv-controls button:is(:hover,:focus-visible) { background: var(--gr-red); }
html.grunge-site .page-timeline .music-tv-standby { color: var(--media-paper); font-family: var(--gr-mono); }

/* Printed archive labels, worn shelves; DVD cases remain the existing components. */
html.grunge-site .page-timeline .music-dvd-shelf h2 {
  color: var(--media-paper); font: 900 1.5rem/1.15 var(--gr-condensed);
  text-transform: uppercase; border-bottom: 3px solid var(--gr-red); padding-bottom: 7px;
}
html.grunge-site .page-timeline .music-dvd-shelf .media-shelf-continuation { color: #d8ccb4; font-family: var(--gr-mono); }
html.grunge-site .page-timeline .music-dvd-row {
  background: var(--gr-texture), linear-gradient(#242c22, #0d100d);
  border: 2px solid var(--gr-ink); border-bottom: 16px solid #4b372c;
  border-radius: 0; box-shadow: inset 0 10px 16px #0005, 5px 7px #050605;
}
html.grunge-site .page-timeline .music-dvd {
  border-color: #af8e77 #080a08 #af8e77 #c5b79c; border-radius: 0;
  box-shadow: 4px 4px #080a08, inset 1px 0 #fcf5f166;
}
html.grunge-site .page-timeline .music-dvd.is-current { border-color: var(--gr-red-bright); }
html.grunge-site .page-timeline .music-dvd-spine-title { font-family: var(--gr-condensed); font-weight: 800; text-transform: uppercase; }
html.grunge-site .page-timeline .music-dvd-spine-label { color: #f3ecd9; font-family: var(--gr-mono); }
html.grunge-site .page-timeline .music-dvd-modal {
  color: var(--media-paper); background: var(--gr-texture), #20291f;
  border: 3px solid #080a08; border-radius: 0; box-shadow: 10px 12px #050605, 0 25px 65px #000b;
}
html.grunge-site .page-timeline .music-dvd-close { color: var(--media-paper); background: var(--gr-red); border-radius: 0; }
html.grunge-site .page-timeline .music-dvd-front { border-color: #af8e77 #111310 #111310 #7d725d; border-radius: 0; }
html.grunge-site .page-timeline .music-dvd-back { background: var(--gr-texture), #29382b; color: var(--media-paper); border-color: #5d6955; border-radius: 0; }
html.grunge-site .page-timeline .music-dvd-cover-title,
html.grunge-site .page-timeline .music-dvd-heading h2 { font-family: var(--gr-condensed); font-weight: 900; text-transform: uppercase; }
html.grunge-site .page-timeline .music-dvd-back :is(h3,dt,cite) { color: #d8be91; font-family: var(--gr-mono); }
html.grunge-site .page-timeline .music-dvd-back a { color: #e2cfaa; }
html.grunge-site .page-timeline .music-dvd-actions button {
  color: var(--media-ink); background: var(--media-paper); border: 2px solid var(--media-ink); border-radius: 0;
}
html.grunge-site .page-timeline .music-dvd-actions button:is(:hover,:focus-visible) { background: #d8cbb2; }

/* Tech and Reflexões share the same book materials; retain both existing interest IDs. */
html.grunge-site .page-timeline:is([data-library-interest=programacao],[data-library-interest=reflexoes]) .library-topic-hero {
  color: var(--media-ink); background: var(--gr-paper-texture); border: 3px solid var(--media-ink);
  border-top: 8px solid var(--gr-red); border-radius: 0; box-shadow: 7px 9px #050605; padding: clamp(16px, 3vw, 30px);
}
html.grunge-site .page-timeline:is([data-library-interest=programacao],[data-library-interest=reflexoes]) .library-topic-hero :is(h1,p,.library-kicker) { color: var(--media-ink); }
html.grunge-site .page-timeline:is([data-library-interest=programacao],[data-library-interest=reflexoes]) #library-topic-title { font-family: var(--gr-condensed); text-transform: uppercase; }
html.grunge-site .page-timeline:is([data-library-interest=programacao],[data-library-interest=reflexoes]) .library-shelf-heading {
  border-bottom: 3px solid var(--gr-red); padding-bottom: 12px;
}
html.grunge-site .page-timeline:is([data-library-interest=programacao],[data-library-interest=reflexoes]) .library-shelf-heading h2 { font-family: var(--gr-condensed); text-transform: uppercase; }
html.grunge-site .page-timeline:is([data-library-interest=programacao],[data-library-interest=reflexoes]) .library-shelf-symbol {
  color: var(--media-ink); background: var(--gr-paper-texture); border: 2px solid var(--media-ink); border-radius: 0;
  box-shadow: 3px 4px #050605; font-family: var(--gr-condensed);
}
html.grunge-site .page-timeline:is([data-library-interest=programacao],[data-library-interest=reflexoes]) .library-shelf-frame {
  background: var(--gr-texture), linear-gradient(135deg, #293127, #111310);
  border: 2px solid #080a08; border-radius: 0; box-shadow: 7px 9px #050605;
}
html.grunge-site .page-timeline:is([data-library-interest=programacao],[data-library-interest=reflexoes]) .library-shelf-frame::after {
  background: repeating-linear-gradient(2deg, #4b372c 0 4px, #554031 5px 7px);
  border-color: #af8e77; border-radius: 0;
}
html.grunge-site .page-timeline:is([data-library-interest=programacao],[data-library-interest=reflexoes]) .library-book {
  border-color: #af8e77; border-radius: 0;
  background: var(--gr-texture), linear-gradient(90deg,#f3ecd933,transparent 13%,#0005 88%),var(--book-color);
  box-shadow: 5px 7px #050605, inset -3px 0 #0005;
}
html.grunge-site .page-timeline:is([data-library-interest=programacao],[data-library-interest=reflexoes]) .library-book-title { font-family: var(--gr-condensed); font-weight: 800; text-transform: uppercase; }
html.grunge-site .page-timeline:is([data-library-interest=programacao],[data-library-interest=reflexoes]) :is(.library-book-mark,.library-book-meta) { font-family: var(--gr-mono); }
html.grunge-site .page-timeline:is([data-library-interest=programacao],[data-library-interest=reflexoes]) .library-shelf-arrow {
  color: var(--media-ink); background: var(--media-paper); border: 2px solid var(--media-ink); border-radius: 0;
}
html.grunge-site .page-timeline .music-search-toggle { color: var(--media-paper); background: var(--gr-red); border: 3px solid var(--media-ink); border-radius: 0; box-shadow: 4px 5px #050605; }

/* Tech: physical file drawers. All rules stay inside the Tech interest. */
body.page-timeline[data-library-interest=programacao] #library-shelves {
  display: flex; flex-direction: column; align-items: center; gap: 34px; padding: 0 10px 36px 0;
}
body[data-library-interest=programacao] .tech-drawer {
  --disk-size: clamp(210px,62vw,270px); --disk-step: 30px; --disk-gap: 20px; --face-height: 118px;
  position: relative; width: min(100%,650px); height: calc(var(--face-height) + 44px);
  isolation: isolate; transition: height 480ms cubic-bezier(.2,.78,.2,1);
}
body[data-library-interest=programacao] .tech-drawer.is-open {
  height: calc(var(--disk-size) + var(--disk-count) * var(--disk-step) + var(--face-height) + 80px); z-index: 1;
}
body[data-library-interest=programacao] .tech-drawer.has-disk { z-index: 2; }
body[data-library-interest=programacao] .tech-drawer-case {
  position: absolute; inset: 0; pointer-events: none; border: 2px solid #080a08;
  background: var(--gr-texture), linear-gradient(145deg,#293127,#111310 75%); box-shadow: 7px 9px #050605,inset 0 0 0 10px #05060544;
}
body[data-library-interest=programacao] .tech-drawer-case::before {
  content: ''; position: absolute; inset: 13px; border: 1px solid #65705b55;
  background: linear-gradient(90deg,#050805 0 6px,transparent 7px calc(100% - 7px),#050805 calc(100% - 6px));
}
body[data-library-interest=programacao] .tech-drawer-content {
  position: absolute; inset: 0; visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity 180ms,visibility 0s 480ms;
}
body[data-library-interest=programacao] .is-open .tech-drawer-content { visibility: visible; opacity: 1; pointer-events: auto; transition: opacity 240ms 100ms,visibility 0s; }
body[data-library-interest=programacao] .tech-preview-space { position: absolute; top: 26px; left: 50%; width: var(--disk-size); height: var(--disk-size); transform: translateX(-50%); pointer-events: none; scroll-margin-top: calc(var(--global-header-height) + 24px); }
body[data-library-interest=programacao] .tech-disk-stack { position: absolute; bottom: calc(var(--face-height) + 34px); left: 50%; width: var(--disk-size); transform: translateX(-50%); }
body[data-library-interest=programacao] .tech-disk-slot { position: relative; height: var(--disk-step); }
body[data-library-interest=programacao] .tech-disk-tab {
  position: relative; z-index: 25; display: flex; align-items: center; gap: 12px; width: 100%; height: var(--disk-step);
  padding: 0 12px; box-sizing: border-box; color: var(--gr-paper-light,#f3ecd9); text-decoration: none;
  background: linear-gradient(#ffffff12,transparent),color-mix(in srgb,var(--disk-color) 58%,#171915);
  border: 1px solid #8d927a; border-left: 4px solid #c7b996; font: 700 11px/1.2 var(--gr-mono,monospace);
  transition: background-color 140ms,border-color 140ms; cursor: pointer;
}
body[data-library-interest=programacao] .tech-disk-tab > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
body[data-library-interest=programacao] .tech-disk-tab time { margin-left: auto; flex-shrink: 0; font-size: 9px; color: #eee1c3; }
body[data-library-interest=programacao] .tech-disk-tab:is(:hover,:focus-visible,.is-selected) { color: #fff9e9; background-color: #384e3c; border-color: var(--gr-paper-light); outline: 2px solid var(--gr-red-bright,#d74238); outline-offset: -2px; }
body[data-library-interest=programacao] .tech-floppy {
  position: absolute; top: 0; left: 50%; width: var(--disk-size); height: var(--disk-size); display: block;
  transform: translate(-50%,0); clip-path: inset(0 0 calc(100% - var(--disk-step)) 0); pointer-events: none;
  z-index: 1; color: var(--gr-ink,#171915); text-decoration: none;
  transition: transform 420ms cubic-bezier(.17,.82,.2,1),clip-path 350ms cubic-bezier(.17,.82,.2,1);
}
body[data-library-interest=programacao] .tech-floppy.is-raised {
  transform: translate(-50%,calc(-1 * (var(--disk-size) + var(--disk-gap) + var(--disk-index) * var(--disk-step))));
  clip-path: inset(0 0 -5px); z-index: 30;
}
body[data-library-interest=programacao] .tech-floppy.is-raised.is-ready { pointer-events: auto; }
body[data-library-interest=programacao] .tech-floppy.is-returning { z-index: 20; }
body[data-library-interest=programacao] .tech-floppy:focus-visible { outline: 3px dashed var(--gr-paper-light); outline-offset: 4px; }
body[data-library-interest=programacao] .tech-floppy-shape {
  position: absolute; inset: 0; display: block; box-sizing: border-box; border: 3px solid #10120f;
  background: var(--gr-texture),linear-gradient(125deg,#ffffff17,transparent 30%,#0005),color-mix(in srgb,var(--disk-color) 30%,#282c28);
  clip-path: polygon(0 12px,12px 0,94% 0,100% 12px,100% 100%,0 100%); box-shadow: inset 0 0 0 3px #73796370;
}
body[data-library-interest=programacao] .tech-floppy-metal {
  position: absolute; top: 0; left: 16%; width: 68%; height: 29%; border: 1px solid #63675d;
  background: linear-gradient(100deg,#8d9187,#e5e1d3 40%,#adb0a4 80%,#787e73); border-radius: 0 0 3px 3px;
}
body[data-library-interest=programacao] .tech-floppy-metal::after { content: ''; position: absolute; right: 17%; top: 12%; width: 19%; height: 70%; background: #1d221b; box-shadow: inset 2px 2px 3px #0008; }
body[data-library-interest=programacao] .tech-floppy-label {
  position: absolute; inset: 33% 10% 9%; display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 6px; padding: 9px 10px 12px;
  border: 1px solid #bdb194; border-bottom: 10px solid var(--gr-red,#ba342c); color: var(--gr-ink,#171915);
  background: repeating-linear-gradient(transparent 0 21px,#ae473524 22px 23px),var(--gr-paper-texture,#f3ecd9);
}
body[data-library-interest=programacao] .tech-floppy-label time { font: 700 9px/1.2 var(--gr-mono,monospace); }
body[data-library-interest=programacao] .tech-floppy-title { font: 700 17px/1.16 'Roboto',Arial,sans-serif; text-transform: none; overflow-wrap: anywhere; }
body[data-library-interest=programacao] .tech-floppy.is-long-title .tech-floppy-title { font-size: 14px; }
body[data-library-interest=programacao] .tech-floppy-action { font: 700 9px/1.2 var(--gr-mono,monospace); }
body[data-library-interest=programacao] .tech-floppy-notch { position: absolute; bottom: 8px; left: 8px; width: 10px; height: 7px; background: #080a08; box-shadow: calc(var(--disk-size) - 41px) 0 #080a08; }
body[data-library-interest=programacao] .tech-drawer-heading { margin: 0; font: inherit; }
body[data-library-interest=programacao] .tech-drawer-toggle {
  position: absolute; inset: auto 12px 20px; z-index: 5; height: var(--face-height); width: calc(100% - 24px);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 22px; text-align: left;
  color: var(--gr-ink,#171915); background: var(--gr-paper-texture,#e8e0cf); border: 2px solid #080a08; border-top: 6px solid var(--gr-red,#ba342c);
  box-shadow: 0 7px #050605,inset 0 0 0 3px #60553b22; cursor: pointer; transition: border-color 160ms,box-shadow 160ms;
}
body[data-library-interest=programacao] .tech-drawer-toggle:is(:hover,:focus-visible) { outline: 3px solid #af8e77; outline-offset: 3px; }
body[data-library-interest=programacao] .tech-drawer-copy { min-width: 0; display: grid; gap: 5px; }
body[data-library-interest=programacao] .tech-drawer-name { color: inherit; font: 900 30px/1 var(--gr-condensed,sans-serif); text-transform: uppercase; }
body[data-library-interest=programacao] .tech-drawer-meta { font: 700 10px/1.2 var(--gr-mono,monospace); }
body[data-library-interest=programacao] .tech-drawer-description { font: 400 12px/1.35 'Roboto',Arial,sans-serif; }
body[data-library-interest=programacao] .tech-drawer-handle { width: 90px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border: 2px solid #080a08; background: linear-gradient(#414b3b,#131811); box-shadow: 3px 3px #15171466; }
body[data-library-interest=programacao] .tech-drawer-handle::after { content: ''; width: 44px; height: 5px; background: #b7a78c; border-bottom: 2px solid #756952; }
body[data-library-interest=programacao] .is-open .tech-drawer-handle::after { background: var(--gr-red-bright,#d74238); }
body[data-library-interest=programacao] .tech-drawer-empty { color: var(--gr-paper-light); text-align: center; font: 400 14px/1.5 'Roboto',Arial,sans-serif; }
@media(max-width:560px) {
  body[data-library-interest=programacao] .tech-drawer { --disk-step: 44px; --face-height: 146px; }
  body[data-library-interest=programacao] .tech-disk-tab { font-size: 10px; padding: 0 7px; gap: 4px; }
  body[data-library-interest=programacao] .tech-disk-tab time { font-size: 8px; }
  body[data-library-interest=programacao] .tech-drawer-toggle { padding: 12px; gap: 12px; }
  body[data-library-interest=programacao] .tech-drawer-handle { width: 48px; height: 34px; }
  body[data-library-interest=programacao] .tech-drawer-handle::after { width: 26px; }
  body[data-library-interest=programacao] .tech-drawer-name { font-size: 25px; }
  body[data-library-interest=programacao] .tech-floppy-title { font-size: 14px; }
  body[data-library-interest=programacao] .tech-floppy.is-long-title .tech-floppy-title { font-size: 12px; }
}
@media(prefers-reduced-motion:reduce) {
  body.page-timeline[data-library-interest=programacao] :is(.tech-drawer,.tech-drawer-content,.tech-floppy,.tech-disk-tab,.tech-drawer-toggle) { transition: none; }
}

/* Reflection covers are note cards, independently of Tech's file drawers. */
body.page-timeline[data-library-interest=reflexoes] { isolation: isolate; }
body.page-timeline[data-library-interest=reflexoes]::before {
  content: ''; position: fixed; inset: -24px; z-index: -1; pointer-events: none;
  background-image: var(--reflection-background, none); background-size: cover; background-position: center;
  filter: blur(14px); opacity: .2;
}
body.page-timeline[data-library-interest=reflexoes] .library-shelves { display: block; }
.reflection-notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 22px; padding: 8px 8px 24px 0; }
.reflection-note {
  --note-stripe: #52765e; display: flex; flex-direction: column; min-width: 0; min-height: 250px;
  padding: 24px 20px 18px; border: 1px solid #a89574; border-top: 5px solid var(--note-stripe);
  background: repeating-linear-gradient(transparent 0 27px, #705a3510 28px 29px), var(--gr-paper-texture, #e9dec8);
  color: #191c16; box-shadow: 4px 5px #050605, 2px 2px 0 1px #ad9e82;
  text-decoration: none; transition: transform .18s ease;
}
.reflection-note:nth-child(3n+2) { --note-stripe: #985d56; }
.reflection-note:nth-child(3n) { --note-stripe: #695977; }
.reflection-note h2 { margin: 0 0 24px; color: inherit; font: 800 clamp(1.4rem, 2.4vw, 1.85rem)/1.1 var(--gr-condensed, sans-serif); overflow-wrap: anywhere; text-transform: none; }
.reflection-note time { margin-top: auto; color: #393d31; font: .75rem/1.5 var(--gr-mono, monospace); }
.reflection-note:is(:hover,:focus-visible) { transform: translateY(-4px); color: #191c16; outline: 3px solid #d0b888; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .reflection-note { transition: none; } }
html.grunge-site .page-timeline .music-search-panel {
  color: var(--media-ink); background: var(--gr-paper-texture); border: 3px solid var(--media-ink); border-radius: 0; box-shadow: 7px 9px #050605;
}
html.grunge-site .page-timeline .music-search-panel :is(h2,label,button) { color: var(--media-ink); }
html.grunge-site .page-timeline .music-search-panel input::placeholder { color: #505447; opacity: 1; }
