/* Shared cabinet, paper and ink across the listening room and its archive. */
:root {
  --wall-ochre: #b28237;
  --wall-texture: url(/art/radio-wall.webp);
  --wall-shade: linear-gradient(104deg, #432a0c9e 3%, #462b0e91 35%, #70441757 64%, #51300e75);
  --cabinet: #19292d;
  --paper: #efe7d3;
  --paper-light: #f7f0df;
  --paper-edge: #c0b092;
  --ink: #213034;
  --muted: #5b5b4e;
  --line: #c9bfa8;
  --strong-line: #958972;
  --soft: #e5dac1;
  --accent: #684027;
}
#mast.room-header, body.dim-listening #mast.room-header {
  position: relative; inset: auto; width: 100%; height: auto; padding: 0; border: 0;
  background: #18262b; color: #f4e9ce; border-bottom: 1px solid #61573f;
}
.room-header .saves-link svg { width: 17px; height: 17px; }
.room-header a:hover { color: #ffe5ac; text-decoration-color: #dbb265; }
#foot { background: #19292d; color: #ddd1b6; margin: 0; padding: 0; }
#foot .gallery-foot { border: none; width: auto; max-width: 1600px; padding-inline: var(--gutter); min-height: 50px; color: inherit; }
#foot svg { width: 14px; height: 14px; vertical-align: middle; }
.room #foot { border-top: 1px solid #586052; }
.paper-edition {
  --ink: #213034; --muted: #575b50; --line: #c9bfa8; --strong-line: #93866c; --soft: #e6dbc3; --accent: #744125;
  min-height: 100vh; color: var(--ink); background-color: var(--wall-ochre);
  background-image: var(--wall-shade), var(--wall-texture);
  background-blend-mode: normal, luminosity;
  background-size: auto, 1440px auto; background-position: center top; background-attachment: fixed;
}
.paper-edition #main {
  margin: clamp(19px,3vw,46px) auto; width: min(1180px,calc(100% - 2 * var(--gutter))); max-width: 1180px;
  padding: clamp(26px,4.5vw,65px); min-height: 65vh; color: var(--ink);
  background: var(--paper) url(/art/paper-grain.webp); border: 1px solid var(--paper-edge);
  box-shadow: 0 2px 3px #201c1866, 5px 11px 20px -5px #1c171a72;
}
.paper-edition #main:focus { outline: none; }
.paper-edition :is(a, button, summary, select, textarea, input):focus-visible { outline: 2px solid #755015; outline-offset: 3px; }
.room-header :is(a,button):focus-visible, #foot a:focus-visible { outline: 2px solid #f5cd80; outline-offset: 3px; }
.paper-edition :is(.page-intro, .article-head, .case-section, .brief-entry, .filters, .library-column, .reading-preview, .reader-tools, .session-settings) { border-color: var(--line); }
.paper-edition #main :is(.panel,.login,.type-panel,.archive-search,.topic-input,.soft-button,.save-small,.jump-mark,.suggestions,.library-row,.reader-tools,.night-player,.text-settings) {
  background-color: var(--paper-light); color: var(--ink); border-color: var(--line);
}
.paper-edition #main :is(.tag,.stage,.ideas button,.topic-shortcuts button,.library-choices button) {
  background: #e5dbc3; color: #3d433c; border-color: #b8ab8b;
}
.paper-edition #main .tag.blue { background: #d4deda; color: #273f44; }
.paper-edition #main :is(.tab-label,.demo-note) { background-color: #e9d59f; color: #443722; border-color: #b59857; }
.paper-edition #main :is(.section-link,.back,.meta,.archive-label,.eyebrow,.micro,.row-label,.preview-byline) { color: var(--muted); }
.paper-edition #main .section-link { color: var(--accent); }
.paper-edition #main :is(.primary,.ink-action,.case-listen,.read-link,.library-choices button[aria-pressed=true]) {
  border-color: #263b3d; background: #23393b; color: #fff1cf;
}
.paper-edition #main :is(.primary,.ink-action,.case-listen,.read-link):hover { background: #32494a; }
.paper-edition #main :is(input:not([type=range]):not([type=checkbox]):not([type=radio]),select,textarea) {
  background-color: var(--paper-light); color: var(--ink); border-color: var(--strong-line);
}
.paper-edition #main input::placeholder,.paper-edition #main textarea::placeholder { color: #69685c; }
.paper-edition #main :is(.archive-search,.topic-input) input { background: transparent; }
.paper-edition #main .idea-chips button { background: #f3ead5; border-color: #bcaf90; }
.paper-edition #main :is(.idea-chips button,.topic-shortcuts button)[aria-pressed=true] { background: #d8c391; color: #282f2a; border-color: #7c6941; }
.paper-edition #main .topic-result:is(:hover,:focus-visible) { background: #e3d7bb; }
.paper-edition #main.archive-directory { max-width: 880px; }
.archive-directory .archive-index { max-width: none; }
.archive-directory .archive-folders { border-top: 2px solid #827553; }
.archive-directory .archive-folders a { min-height: 79px; padding-inline: 10px; }
.archive-directory .archive-folders svg:first-child { width: 38px; height: 40px; padding: 9px; color: #f4d298; background: var(--cabinet); border-radius: 2px; }
.archive-directory .archive-folders a:hover { background: #e7ddc4; }
.paper-edition .composer-photo, .paper-edition .listening-cover, .paper-edition .story-plate, .paper-edition .preview-frame {
  outline: 1px solid #665d48; outline-offset: 3px; box-shadow: 2px 5px 10px #302a2040;
}
.paper-edition .composer-photo::after { background: linear-gradient(0deg,#0d1e22fc 0%,#142528d1 29%,#182a2c1f 69%); }
.paper-edition .composer-photo .night-class,.paper-edition .listening-cover .night-class { color: #f5cd82; }
.paper-edition .listening-cover { background-color: #162527; }
.paper-edition .file-imprint { color: #e9c882; background: #24393b url(/art/paper-grain.webp); }
.paper-edition :is(.jacket-art,.story-plate) { background-color: #e8ddc1; }
.paper-edition .reading-preview { background: #e4d9bd; }
.paper-edition .prose { color: var(--ink); }
.paper-edition .type-panel { box-shadow: 0 5px 15px #332a2240; }
.paper-edition #main :is(.archive-match,.case-row,.desk-item,.brief-entry):hover { border-color: #958565; }
.paper-edition :is(.library-row,.case-row,.brief-entry,.login,.panel,.archive-folders,.saved-section) { border-radius: 1px; }
.paper-edition #main .login { border-top: 3px solid #986f30; }
.paper-edition .product-print { background: #ded1b2; }
.paper-edition.dim-listening {
  --ink: #ebe4d4; --muted: #c3bba6; --line: #465453; --strong-line: #889188; --soft: #314245; --accent: #efc785;
  --paper-light: #233437; background: #101c1f;
}
.paper-edition.dim-listening #main { background: #1b2b2e; border-color: #344346; color: var(--ink); box-shadow: none; }
.paper-edition.dim-listening #main :is(.studio-wrap,.night-player,.audio-tools,.night-transcript) { background: #1b2b2e; color: var(--ink); }
.paper-edition.dim-listening #main .ink-action, .paper-edition.dim-listening #toggle-tape { background: #e3c68e; color: #1b2827; }
.paper-edition.dim-listening #main .section-link { color: #ecca83; }
.paper-edition.dim-listening :is(a,button,input,select,summary):focus-visible { outline-color: #f1cd86; }
@media(max-width:640px) {
  .paper-edition { background-attachment: scroll; }
  .paper-edition #main { width: calc(100% - 16px); margin: 10px auto 14px; padding: 23px clamp(12px,4vw,21px); }
  .paper-edition #main.library-layout { display: block; }
}

.paper-edition #night-form #make-night { background: #243b3c; color: #fff0d0; }
.paper-edition #night-form #make-night:hover { background: #344d4d; }
.paper-edition { display: flex; flex-direction: column; }
.paper-edition #foot { margin-top: auto; }

.room-brand .studio-wordmark { display: block; width: 88px; height: auto; }
@media(max-width:640px){.room-brand .studio-wordmark{width:66px}}

.paper-edition #main.profile-page { max-width:720px; min-height:0; }
.profile-sheet header { margin:18px 0 24px; }
.profile-sheet h1 { margin:0 0 .25em; font-size:clamp(2.4rem,6vw,4rem); letter-spacing:-.065em; line-height:1; }
.profile-sheet header p { color:var(--muted); max-width:45ch; }
.identity-fields { display:grid; grid-template-columns:clamp(84px,21vw,140px) minmax(0,1fr); gap:clamp(16px,4vw,32px); align-items:center; }
.profile-print { padding:5% 5% 11%; background:#f8ebcd url(/art/paper-grain.webp); box-shadow:1px 2px 5px #39302360; transform:rotate(-3deg); }
.profile-print img { width:100%; height:auto; aspect-ratio:1; object-fit:cover; }
.profile-sheet label { display:block; font-weight:600; font-size:1rem; }
.profile-sheet :is(input[type=text], select) { display:block; width:100%; min-height:46px; margin-top:5px; padding:8px 10px; border:1px solid var(--strong-line); border-radius:2px; font:inherit; }
.portrait-actions,.profile-save { display:flex; align-items:center; column-gap:16px; flex-wrap:wrap; }
.portrait-actions button { min-height:44px; padding:0; border:0; background:transparent; text-decoration:underline; }
.profile-listening { min-width:0; margin:30px 0 22px; padding:18px 0 0; border:0; border-top:1px solid var(--strong-line); display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.profile-listening legend { padding:0 .7em 0 0; font-size:1.2rem; font-weight:650; }
.profile-listening .profile-check { display:flex; align-items:center; gap:10px; grid-column:1/-1; line-height:1.35; min-height:44px; font-weight:450; cursor:pointer; }
.profile-check input { flex:none; width:20px; height:20px; margin:0; accent-color:#2c4545; }
.profile-save { row-gap:8px; }
.profile-save button { min-height:46px; }
#profile-status { color:var(--muted); font-size:.94rem; }
@media(max-width:390px) { .profile-listening { grid-template-columns:1fr; gap:10px; } }

.episode-board { margin:1rem 0; container-type:inline-size; min-width:0; }
.episode-board > summary { cursor:pointer; width:fit-content; min-height:44px; padding:.6rem 0; font-size:1.05rem; font-weight:630; }
.file-felt {
  background:#183436 url(/art/radio-board.webp) center / 100% 100% no-repeat; color:#f1e7d0;
  padding:clamp(18px,4%,32px); box-shadow:1px 3px 6px #15212244;
}
.file-felt > p { color:#e7dec7; font-size:.9rem; margin:0 0 1.1rem; line-height:1.4; }
.file-chain { display:grid; grid-template-columns:minmax(0,1fr); gap:0; align-items:center; }
.file-chain button { appearance:none; position:relative; margin:0; min-width:0; cursor:pointer; }
.file-pin {
  padding:6px; border:1px solid #bbac89; display:flex; align-items:center; gap:12px; text-align:left;
  background:#ede2c6 url(/art/paper-grain.webp); color:#1a292d; box-shadow:1px 3px 4px #030b0aca,3px 7px 9px #0714149c;
  transform:rotate(-1deg);
}
.file-pin::before { content:""; position:absolute; left:9px; top:4px; width:8px; height:8px; border-radius:50%; background:radial-gradient(circle at 32% 24%,#ffe9a7,#9c7949 60%,#5d482c); box-shadow:1px 1px 1px #49341e; }
.file-pin[data-note="lights"] { transform:rotate(1deg); }
.file-pin[aria-current]::before { outline:2px solid #a32c36; outline-offset:2px; }
.file-pin[aria-pressed="true"] { border-color:#e4b65f; }
.file-pin img,.file-pin .catalog-slip { width:33%; aspect-ratio:1.25; object-fit:cover; display:block; flex:none; filter:sepia(.24) saturate(.7); }
.file-pin small,.file-pin strong { display:block; text-align:left; line-height:1.25; }
.file-pin small { font:400 .76rem/1.3 ui-monospace,monospace; color:#575044; }
.file-pin strong { margin-top:3px; font-weight:650; font-size:1rem; color:#1a292d; }
.file-pin .catalog-slip { display:grid; align-content:center; padding:5px; color:#53452e; background:#dbcdac; font:600 clamp(.69rem,3.8cqi,1.05rem)/1.35 ui-monospace,monospace; border:1px solid #a99c7d; }
.file-chain .file-thread { width:48px; height:46px; justify-self:center; display:grid; place-items:center; padding:0; border:0; background:transparent; }
.file-thread i { position:relative; width:3px; height:calc(100% + 4px); background:repeating-linear-gradient(33deg,#ad3741 0 2px,#e26261 2.5px,#822e32 4px); transform:rotate(4deg); box-shadow:1px 1px 1px #100f0ab3; }
.file-thread::after { content:""; position:absolute; width:9px; height:9px; border:2px solid #d28c7a; border-radius:50%; background:#883138; box-shadow:0 2px 3px #0d1111; }
.file-thread[data-playing-link] i { box-shadow:0 0 3px #ffbf88,0 1px 2px #2a1011; }
.file-thread:is(:hover,[aria-pressed=true],[data-playing-link])::after { background:#fee6af; border-color:#923c42; }
.paper-edition .file-chain button:focus-visible { outline:3px solid #ffe5a1; outline-offset:2px; z-index:1; }
.file-explanation { background:var(--paper-light); color:var(--ink); padding:1rem; border:1px solid var(--line); }
.file-explanation h3 { margin:0 0 .35rem; font-size:1.13rem; line-height:1.3; }
.file-explanation p { margin:0; font-size:.98rem; line-height:1.5; }
.file-actions { display:flex; gap:.9rem; flex-wrap:wrap; align-items:center; margin-top:.55rem; }
.file-actions a,.file-actions button,.file-credits { display:inline-flex; align-items:center; min-height:44px; text-decoration:underline; text-underline-offset:3px; color:var(--accent); font:inherit; }
.file-actions button { padding:0; border:0; background:transparent; }
.file-credits { font-size:.84rem; }
.personal-board,.profile-boards { scroll-margin-top:1rem; }
.personal-board .file-felt { background-color:#223a38; }
.board-trail-picker { position:relative; display:grid; gap:.4rem; max-width:100%; margin:0 0 .85rem; color:#fff1ce; font-weight:600; }
.board-trail-picker::after { content:""; position:absolute; right:15px; bottom:19px; width:7px; height:7px; transform:rotate(45deg); border:solid currentColor; border-width:0 2px 2px 0; color:#314543; pointer-events:none; }
.dim-listening .board-trail-picker::after { color:#e7d7b5; }
.board-trail-picker select { appearance:none; width:100%; max-width:100%; min-width:0; min-height:44px; padding:.5rem 2rem .5rem .7rem; border:1px solid #a69471; border-radius:3px; background:#efe5cd; color:#193332; font:inherit; text-overflow:ellipsis; }
.personal-board .file-pin > span:last-child,.profile-board-list a > span { min-width:0; overflow-wrap:anywhere; }
.personal-board .file-pin { align-self:stretch; }
.personal-board .file-pin:nth-of-type(3) { transform:rotate(1.1deg); }
.personal-board .file-pin[aria-pressed=true]::before { box-shadow:0 0 0 2px #913d41,1px 2px 3px #342a1d; }
.board-paper-slip { display:flex; flex-direction:column; justify-content:center; gap:5px; flex:none; width:33%; aspect-ratio:1.25; padding:8px; background:repeating-linear-gradient(0deg,transparent 0 12px,#aab1a442 12px 13px),#d7cfb4; box-shadow:inset 0 0 0 1px #91856a74; }
.board-paper-slip i { display:block; width:78%; height:2px; background:#827f6e; }
.board-paper-slip b { font:650 .73rem/1.15 ui-monospace,monospace; text-transform:uppercase; color:#4d5146; overflow-wrap:anywhere; }
.board-paper-slip i:nth-child(2) { width:95%; }
.board-paper-slip i:last-child { width:55%; }
.personal-board .file-actions a { overflow-wrap:anywhere; max-width:100%; }
.personal-board .file-explanation { border-left:3px solid #904747; }
.profile-boards { margin:0 0 2rem; padding:1.1rem 0 1.35rem; border-block:1px solid var(--line); }
.profile-boards h2 { margin:0; font-size:1.4rem; }
.profile-boards p { color:var(--muted); margin:.25rem 0 .8rem; }
.profile-board-list { list-style:none; padding:0; margin:.75rem 0 0; }
.profile-board-list li + li { border-top:1px solid var(--line); }
.profile-board-list a { display:grid; grid-template-columns:58px minmax(0,1fr) 1.2em; align-items:center; gap:.9rem; text-decoration:none; color:inherit; padding:.65rem 0; }
.profile-board-list a:hover strong { text-decoration:underline; text-underline-offset:3px; }
.profile-board-list img { width:58px; height:52px; object-fit:cover; border:3px solid #e2d8ba; box-shadow:1px 2px 3px #413c3666; transform:rotate(-2deg); }
.profile-board-list :is(small,strong) { display:block; }
.profile-board-list small { color:var(--muted); font-size:.75rem; }
@media (prefers-reduced-motion:no-preference) and (hover:hover) {
  .personal-board .file-pin,.personal-board .file-thread i { transition:transform .18s ease-out,box-shadow .18s ease-out; }
  .personal-board .file-pin:hover { transform:translateY(-2px) rotate(.4deg); box-shadow:3px 7px 11px #07141499; }
  .personal-board .file-thread:hover i { transform:rotate(0deg); }
}
@container (min-width:510px) {
  .file-chain.board-pair { grid-template-columns:minmax(0,1fr) 48px minmax(0,1fr); }
  .personal-board .board-paper-slip { width:100%; aspect-ratio:1.38; padding:12%; margin-bottom:6px; }
  .file-chain { grid-template-columns:minmax(0,1fr) 45px minmax(0,1fr) 45px minmax(0,1fr); }
  .file-pin { display:block; padding:6px 6px 10px; height:100%; }
  .file-pin img,.file-pin .catalog-slip { width:100%; aspect-ratio:1.38; margin-bottom:6px; }
  .file-pin .catalog-slip { padding-left:10px; }
  .file-chain .file-thread { width:100%; }
  .file-thread i { width:calc(100% + 6px); height:3px; transform:rotate(-5deg); }
}
