body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.45;
    max-width: 920px;
    margin: 0 auto;
    padding: 12px 12px 40px 12px;
    background: #f6f6f6;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.01) 2px, rgba(0,0,0,.01) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,.01) 2px, rgba(0,0,0,.01) 4px);
    color: #000;
}

a { color: #00c; }
a:visited { color: #551a8b; }

h1 {
    font-size: 22px;
    margin: 10px 0 4px 0;
    border-bottom: 3px double #999;
    padding-bottom: 8px;
    letter-spacing: 1px;
}
h2 { font-size: 15px; font-weight: normal; color: #666; margin: 0 0 10px 0; }
h3 {
    font-size: 15px;
    margin: 20px 0 8px 0;
    background: #eee;
    padding: 4px 7px;
    border: 1px solid #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}
hr { border: none; border-top: 1px solid #ccc; margin: 12px 0; }
.small { font-size: 13px; color: #666; }

.panel { border: 1px solid #333; padding: 14px; margin: 14px 0; background: #fff; }
.panel-hero { border: 2px solid #333; background: #fffef5; }
.panel-title { font-weight: bold; font-size: 17px; margin: 0 0 8px 0; }
.panel-subtitle { font-size: 14px; color: #666; margin: 0 0 12px 0; font-style: italic; }
.panel form { margin: 0; padding: 0; background: none; display: flex; flex-wrap: wrap; gap: 8px; }
.panel input[type="email"] { padding: 9px 10px; font-size: 16px; flex: 1 1 200px; min-width: 0; border: 1px solid #999; }
.panel input[type="submit"] { padding: 9px 18px; font-size: 15px; cursor: pointer; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 10px 0; }
.tab {
    font-size: 14px;
    padding: 6px 14px;
    background: #ccc;
    border: 1px outset #999;
    cursor: pointer;
    font-family: inherit;
    color: #000;
}
.tab:active { border-style: inset; }
.tab.on { background: #222; color: #fff; border-style: inset; font-weight: bold; }
.tab[disabled] { color: #888; cursor: not-allowed; background: #e2e2e2; }

.controls {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    border: 1px solid #333; background: #fff; padding: 10px; margin: 10px 0;
}
.controls input[type="search"] {
    flex: 1 1 200px; min-width: 0;
    padding: 8px 10px; font-size: 15px; border: 1px solid #999; font-family: inherit;
}
.controls select { padding: 7px 8px; font-size: 14px; border: 1px solid #999; font-family: inherit; background: #fff; }
.controls label { font-size: 13px; color: #666; }

.stats {
    font-family: 'Courier New', monospace; font-size: 13px; color: #666;
    border-top: 1px solid #ccc; border-bottom: 1px solid #ccc;
    padding: 6px 2px; margin: 10px 0;
}
.stats b { color: #9B4A34; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    gap: 14px;
    margin: 14px 0;
}
.rec {
    background: #fff;
    border: 2px solid #333;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex; flex-direction: column;
    text-align: left;
    padding: 0;
    font-family: inherit;
    overflow: hidden;
}
.rec:hover { box-shadow: 4px 4px 0 #9B4A34; }
.rec:focus-visible { outline: 3px solid #00c; outline-offset: 2px; }
.rec-art { display: block; position: relative; background: #4F6A89; }
.rec-art img {
    display: block; width: 100%; aspect-ratio: 1 / 1;
    object-fit: cover; border-bottom: 1px solid #333;
}
.rec-dur {
    position: absolute; right: 0; bottom: 0;
    background: rgba(0,0,0,0.72); color: #fff;
    font-family: 'Courier New', monospace; font-size: 12px;
    padding: 2px 5px;
}
.rec-cap { display: block; padding: 7px 8px; }
.rec-artist { display: block; font-weight: bold; font-size: 13px; line-height: 1.25; }
.rec-title { display: block; font-size: 13px; color: #333; line-height: 1.25; margin-top: 2px; }
.rec-year { display: block; font-family: 'Courier New', monospace; font-size: 12px; color: #666; margin-top: 3px; }

.empty { border: 1px solid #ccc; background: #fff; padding: 20px; text-align: center; color: #666; }

.sheet {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.55);
    display: none; align-items: flex-start; justify-content: center;
    padding: 20px 12px; overflow-y: auto;
}
.sheet.open { display: flex; }
.sheet-inner {
    background: #fff; border: 2px solid #333;
    box-shadow: 6px 6px 0 rgba(0,0,0,0.35);
    max-width: 620px; width: 100%; padding: 16px;
}
.sheet-top { display: flex; gap: 16px; }
.sheet-art { width: 220px; flex-shrink: 0; }
.sheet-art img { width: 100%; display: block; border: 1px solid #333; }
.sheet-meta { flex: 1; min-width: 0; }
.sheet-artist { font-weight: bold; font-size: 20px; line-height: 1.2; }
.sheet-title { font-size: 18px; margin-top: 2px; line-height: 1.25; }
.sheet-rows { font-family: 'Courier New', monospace; font-size: 13px; color: #444; margin-top: 10px; }
.sheet-rows div { padding: 2px 0; border-bottom: 1px dotted #ddd; }
.sheet-rows span { color: #888; display: inline-block; min-width: 72px; }
.sheet-tag {
    display: inline-block; font-size: 11px; font-weight: bold;
    text-transform: uppercase; letter-spacing: 1px;
    color: #fff; background: #9B4A34; padding: 1px 6px; margin: 0 4px 4px 0;
}
.sheet-tag.blue { background: #4F6A89; }
.sheet-note { font-size: 12px; color: #666; font-style: italic; margin-top: 8px; }
.sheet-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sheet-close {
    background: #ccc; border: 1px outset #999; padding: 7px 16px;
    font-size: 14px; cursor: pointer; font-family: inherit;
}
.sheet-close:active { border-style: inset; }
.sheet-links { font-size: 14px; }
.sheet-links .sep { color: #999; }
.sheet-nav { margin-left: auto; font-size: 14px; }
.sheet-nav button {
    background: none; border: none; color: #00c; text-decoration: underline;
    cursor: pointer; font-size: 14px; font-family: inherit; padding: 2px 4px;
}
.sheet-nav button:hover { color: #fff; background: #00c; text-decoration: none; }
.sheet-nav button[disabled] { color: #aaa; text-decoration: none; cursor: default; background: none; }

.btn95w {
    background: #ccc;
    border: 1px outset #999;
    padding: 7px 14px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    color: #000;
}
.btn95w:hover { background: #222; color: #fff; }
.btn95w:active { border-style: inset; }

.cat-head {
    grid-column: 1 / -1;
    margin: 10px 0 0 0;
    background: #eee;
    border: 1px solid #ccc;
    padding: 5px 8px;
}
.cat-head:first-child { margin-top: 0; }
.cat-name {
    font-size: 15px; font-weight: bold;
    text-transform: uppercase; letter-spacing: 1px;
}
.cat-count { font-family: 'Courier New', monospace; font-size: 13px; color: #666; font-weight: normal; }
.cat-blurb { font-size: 13px; color: #666; font-style: italic; margin-top: 2px; }

.rec.mine { box-shadow: 4px 4px 0 #D8A34A; }
.rec.mine:hover { box-shadow: 4px 4px 0 #9B4A34; }
.sheet-tag.gold { background: #D8A34A; color: #222; }

.footer { font-size: 13px; color: #666; margin-top: 18px; line-height: 1.7; }

@media (max-width: 560px) {
    body { font-size: 17px; }
    h1 { font-size: 23px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
    .sheet-top { flex-direction: column; }
    .sheet-art { width: 100%; }
    .sheet-nav { margin-left: 0; width: 100%; }
}
