/* Karloz Audio Player - modern premium, dark, copper accent. No visualizers. */

:root {
  --bg: #0F0E0D; --panel: #171513; --raised: #221F1C; --hover: #2C2824; --border: #2E2A26;
  --text: #F3EDE7; --muted: #A2988E; --accent: #DB7A30; --accent-hi: #EE8F47; --on-accent: #140D07;
  --danger: #E5534B;
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #F3EFEA; --panel: #FBF9F6; --raised: #ECE6DF; --hover: #E2DAD1; --border: #D6CDC3;
  --text: #1C1815; --muted: #6A6058; --accent: #BF5F17; --accent-hi: #D4712A; --on-accent: #FFFFFF;
  --danger: #C0392B;
  color-scheme: light;
}
html { font-size: 15px; }
html[data-size="small"] { font-size: 13px; }
html[data-size="large"] { font-size: 18px; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem; line-height: 1.35; overflow: hidden; user-select: none; -webkit-user-select: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

#app {
  height: 100%; display: grid; gap: 14px; padding: 14px;
  grid-template-columns: 16.5rem minmax(0, 1fr) 27rem; grid-template-rows: auto minmax(0, 1fr) auto auto;
}
/* Radio Sabor face (Carlos, Nov 1 2026): PLAYER | RADIO SABOR tabs at the top; RADIO SABOR flashes while a DJ is live */
#faces { grid-column: 1 / -1; display: flex; border: 2px solid var(--accent); border-radius: 12px; overflow: hidden; }
#faces button { flex: 1; padding: .8rem 0; border: none; background: none; color: var(--accent); font-weight: 700; letter-spacing: 2px; font-size: 1.05rem; }
#faces button.on { background: var(--accent); color: var(--on-accent); }
#radio { display: none; grid-column: 1 / -1; overflow-y: auto; padding: 24px 16px; flex-direction: column; align-items: center; gap: 28px; }
#app[data-face="radio"] #left, #app[data-face="radio"] #center, #app[data-face="radio"] #right { display: none !important; }
#app[data-face="radio"] #radio { display: flex; }
.rs-top { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.rs-disc { width: 150px; height: 150px; }
.rs-name { background: none; border: none; color: var(--accent); font-size: 2.4rem; font-weight: 800; letter-spacing: 4px; padding: 0; }
.rs-name.live { animation: rs-onair 1s steps(1, end) infinite; }
@keyframes rs-onair { 50% { color: var(--muted); opacity: .35; } }
.rs-slogan { font-size: 1.15rem; color: var(--text); letter-spacing: 1px; }
.rs-state { font-weight: 700; letter-spacing: 2px; color: var(--muted); }
.rs-state.live { color: #E8603A; }
.rs-song { color: var(--muted); min-height: 1.4rem; }
.rs-play { margin-top: 6px; }
.rs-play svg { width: 100%; height: 100%; fill: var(--on-accent); }
.rs-msg { font-size: 1.2rem; font-weight: 600; color: var(--text); background: var(--raised); border: 1px solid var(--accent); border-radius: 12px; padding: 14px 18px; max-width: 26rem; }
.rs-sched { width: 100%; max-width: 40rem; background: var(--raised); border-radius: 14px; padding: 18px 20px; text-align: center; }
.rs-sched-title { color: var(--accent); font-size: 1.4rem; font-weight: 800; letter-spacing: 2px; margin-bottom: 10px; }
.sched-now { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; }
.sched-now .on { color: #E8603A; }
.sched-list { display: flex; flex-direction: column; gap: 6px; text-align: left; margin-bottom: 8px; }
.sched-row { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 10px; padding: .55rem .8rem; border-radius: 10px; background: var(--panel); border: 1px solid var(--border); }
.sched-row.next { border-color: var(--accent); }
.sched-row .when { font-weight: 700; font-variant-numeric: tabular-nums; }
.sched-row .who { color: var(--text); }
.sched-row .who b { color: var(--accent); }
.sched-row .tag { font-size: .8rem; color: var(--accent); font-weight: 700; letter-spacing: 1px; }
.rs-slots { width: 100%; max-width: 40rem; background: var(--raised); border-radius: 14px; padding: 20px 22px; text-align: center; line-height: 1.55; }
.rs-slots-title { color: var(--accent); font-size: 1.5rem; font-weight: 800; letter-spacing: 2px; }
.rs-slots-lead { font-size: 1.3rem; font-weight: 700; margin: 10px 0 4px; }
.rs-only { color: var(--accent); font-weight: 700; }
.rs-ask { display: block; margin-top: 14px; color: var(--accent); font-weight: 600; }
.rs-book { display: inline-block; text-decoration: none; padding: .8rem 1.6rem; font-size: 1.1rem; margin-top: 6px; }
/* Change 67 (Carlos, Nov 1 2026): three banners for advertisers, words sliding right to left nonstop, above his credit.
   Side by side on a computer, one under the other on the phone. */
#ads[hidden] { display: none; }
#ads { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ad { position: relative; overflow: hidden; border-radius: 12px; height: 4.4rem; display: flex; flex-direction: column; justify-content: center; background: var(--panel, #1c1917); }
.ad-track { display: flex; width: max-content; white-space: nowrap; animation: ad-move 18s linear infinite; }
.ad-track span { padding: 0 1.6rem; }
@keyframes ad-move { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ad-a { border: 2px solid var(--accent); }
.ad-a .ad-track { font-size: 1.6rem; font-weight: 600; color: var(--accent); }
.ad-a .ad-track span:not(.o) { color: var(--text); }
a.ad { text-decoration: none; cursor: pointer; }
.ad-b { background: var(--accent); }
.ad-b .ad-track { font-size: 1.45rem; font-weight: 600; color: #1c1917; }
.ad-b .ad-sub { text-align: center; font-size: .85rem; color: #1c1917; margin-top: 2px; }
.ad-c { border: 1px solid var(--border); }
.ad-c .ad-track { font-size: 1.3rem; color: var(--text); animation-duration: 24s; }
.ad-c .o { color: var(--accent); font-weight: 600; }
/* his credit under the app (Carlos, Oct 4 2026) */
#credit { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 2px 0; }
#credit a { color: var(--accent); font-weight: 600; text-decoration: none; }
#credit a:hover { text-decoration: underline; }
.panel { background: var(--panel); border-radius: 14px; min-height: 0; }
#left { display: flex; flex-direction: column; gap: 8px; padding: 20px 16px 16px; }
#center { display: flex; flex-direction: column; gap: 14px; min-height: 0; min-width: 0; }
#right { display: flex; flex-direction: column; gap: 12px; padding: 20px 18px 16px; overflow-y: auto; }

.brand { font-size: 1.35rem; font-weight: 700; letter-spacing: 4px; }
/* Change 55 (Carlos, Nov 1 2026): DjKARLOZ in the diamond lettering of his Corpus Nudum site. Change 62: plain orange letters
   like the buttons (no dark facets, no yellow), a white light sweeping left to right, and a small diamond flashing on each
   letter as the light reaches it (top, middle or bottom). Not tied to the sound in any way. */
.brand .cut { position: relative; display: inline-block; isolation: isolate; color: var(--accent); }
.brand .cut .disp-c, .brand .cut .disp-m { display: none; }
.brand .cut .glare { position: absolute; inset: 0; color: #fff; pointer-events: none;
  --g: linear-gradient(102deg, transparent 0%, rgba(0,0,0,.35) 35%, #000 50%, rgba(0,0,0,.35) 65%, transparent 100%);
  -webkit-mask-image: var(--g); mask-image: var(--g);
  -webkit-mask-size: 45% 100%; mask-size: 45% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  animation: brand-sweep 5.5s linear infinite;
  text-shadow: 0 0 8px rgba(255,255,255,.9), 0 0 20px rgba(255,220,180,.55); }
@keyframes brand-sweep { 0% { -webkit-mask-position: -60% 0; mask-position: -60% 0; }
  60%, 100% { -webkit-mask-position: 160% 0; mask-position: 160% 0; } }
.brand .sparkbox { position: absolute; inset: 0; pointer-events: none; }
.brand .spark { position: absolute; width: 11px; height: 11px; margin-left: -5.5px; background: #fff; opacity: 0;
  clip-path: polygon(50% 0, 55% 45%, 100% 50%, 55% 55%, 50% 100%, 45% 55%, 0 50%, 45% 45%);
  filter: drop-shadow(0 0 4px rgba(255,255,255,.95));
  animation: brand-glint 5.5s ease-out infinite backwards; }
@keyframes brand-glint { 0% { opacity: 0; transform: scale(.1) rotate(0); }
  4% { opacity: 1; transform: scale(1) rotate(30deg); }
  10%, 100% { opacity: 0; transform: scale(.2) rotate(60deg); } }
@media (prefers-reduced-motion: reduce) {
  .brand .cut .glare { animation: none; -webkit-mask-position: 35% 0; mask-position: 35% 0; }
  .brand .spark { animation: none; opacity: 0; } }
.brand-sub { font-size: .8rem; color: var(--muted); letter-spacing: 3px; margin-bottom: 14px; }
.section { font-size: .8rem; color: var(--muted); letter-spacing: 2px; font-weight: 600; }
.section.spaced, .head.spaced { margin-top: 18px; }
.muted { color: var(--muted); font-size: .87rem; }
.center { text-align: center; }
.value { color: var(--accent); font-weight: 600; }
.head { display: flex; justify-content: space-between; align-items: baseline; }

.btn {
  background: var(--raised); border: 1px solid var(--border); border-radius: 9px;
  padding: .55rem .95rem; transition: background .12s;
}
.btn:hover { background: var(--hover); }
.btn:active { background: var(--border); }
.btn:disabled { color: var(--muted); cursor: default; opacity: .6; }
.btn.primary, .btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { background: var(--accent-hi); }
.btn.wide { width: 100%; }
.btn.small { padding: .55rem .3rem; }
.btn.tool { padding: .5rem .75rem; }
.btn.tool.on { color: var(--accent); border-color: var(--accent); font-weight: 600; } /* DJ mode: On (Change 63) */
.btn.power { width: 100%; padding: .85rem; font-weight: 700; letter-spacing: 1px; }
.btn.power[aria-pressed="false"] { border: 2px solid var(--accent); color: var(--accent); }
.btn.reset { width: 100%; margin-top: .5rem; }
.btn.grow, .grow { flex: 1; }
.flat { background: none; border: none; color: var(--muted); padding: .4rem .65rem; }
.flat:hover { color: var(--text); }
.flat[aria-pressed="true"], .flat.on { color: var(--accent); font-weight: 600; }
button:focus-visible, input:focus-visible, select:focus-visible, .list:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.row-gap { display: flex; gap: 6px; align-items: center; }

.nav { flex: 1; overflow-y: auto; margin-top: 10px; min-height: 0; }
.nav button { display: block; width: 100%; text-align: left; background: none; border: none; padding: .55rem .7rem; border-radius: 8px; }
.nav button:hover { background: var(--raised); }
.nav button.on { background: var(--raised); color: var(--accent); font-weight: 600; }
.nav .nav-count { margin-left: .5rem; color: var(--muted); font-size: .8rem; font-weight: 400; }
.nav .nav-label { padding: .9rem .7rem .3rem; color: var(--muted); font-size: .8rem; letter-spacing: 2px; }

/* player */
#player { padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 8px; }
.now { display: flex; gap: 22px; align-items: center; }
.art {
  width: 190px; height: 190px; flex: none; border-radius: 14px; background: var(--raised) center/cover no-repeat;
  position: relative; overflow: hidden;
}
.art.empty::before, .art.empty::after {
  content: ""; position: absolute; inset: 16%; border-radius: 50%; border: 2px solid var(--border);
}
.art.empty::after { inset: 46.500%; border: none; background: var(--accent); }
.info { flex: 1; min-width: 0; }
.title { font-size: 1.75rem; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.artist { font-size: 1.2rem; color: var(--accent); margin-top: 4px; }
.album { color: var(--muted); margin-top: 2px; }
.tech { color: var(--muted); font-size: .87rem; margin-top: 10px; }
.icon-btn { background: none; border: none; padding: 6px; width: 54px; height: 54px; border-radius: 50%; }
.icon-btn svg { width: 100%; height: 100%; fill: var(--text); }
.icon-btn:hover svg { fill: var(--accent-hi); }
.heart { align-self: flex-start; width: 46px; height: 46px; }
.heart svg { fill: none; stroke: var(--muted); stroke-width: 1.800; }
.heart:hover svg { fill: none; stroke: var(--text); }
.heart[aria-pressed="true"] svg { fill: var(--accent); stroke: var(--accent); }
#resumeBar { align-self: flex-start; }

.seek { position: relative; height: 40px; cursor: pointer; touch-action: none; margin: 0 2px; }
.seek-track { position: absolute; left: 0; right: 0; top: 23px; height: 6px; border-radius: 3px; background: var(--raised); }
.seek-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: var(--accent); }
.seek-band { position: absolute; top: -5px; bottom: -5px; background: var(--accent); opacity: .18; }
.seek-band.on { opacity: .38; }
.seek-knob { position: absolute; top: 18px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--text); left: 0; }
.mark { position: absolute; top: 14px; width: 2px; height: 24px; margin-left: -1px; background: var(--text); }
.mark span { position: absolute; top: -15px; left: -5px; font-size: 12px; font-weight: 700; }
.times { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .93rem; font-variant-numeric: tabular-nums; }
.status { flex: 1; text-align: center; font-size: .87rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.controls > .flat { justify-self: start; }
.right-flats { justify-self: end; display: flex; gap: 6px; }
.transport { display: flex; align-items: center; gap: 18px; }
.play-btn { width: 76px; height: 76px; border-radius: 50%; border: none; background: var(--accent); padding: 18px; transition: background .12s; }
.play-btn:hover { background: var(--accent-hi); }
.play-btn svg { width: 100%; height: 100%; fill: var(--on-accent); display: block; }
.volume { display: flex; align-items: center; gap: 12px; }
.volume .range { flex: 1; }
.volume .value { width: 3.5rem; }

/* range inputs */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; margin: 0; --p: 50%; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--raised); }
.range.fill::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--accent) var(--p), var(--raised) var(--p)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--text); margin-top: -6px; border: none; }
.range::-moz-range-track { height: 6px; border-radius: 3px; background: var(--raised); }
.range.fill::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--accent); }
.range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--text); border: none; }

/* listing */
#listing { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 14px; min-height: 0; }
.list-head { display: flex; align-items: center; gap: 12px; }
.view-title { font-size: 1.27rem; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-title .vt-name { color: #E8603A; }
.view-title .vt-info { font-size: .8rem; font-weight: 400; color: var(--muted); white-space: pre; }
input[type="search"], select, input[type="text"], input[type="number"] {
  background: var(--raised); border: 1px solid var(--border); border-radius: 9px; padding: .5rem .7rem; min-width: 0;
  user-select: text; -webkit-user-select: text;
}
#search { width: 22rem; max-width: 50%; }
input:focus, select:focus { border-color: var(--accent); outline: none; }
select { flex: 1; }
.tools { display: flex; flex-wrap: wrap; gap: 6px; }
.list-cols, .trk { display: grid; grid-template-columns: 2.4rem minmax(0, 2.2fr) minmax(0, 1.2fr) minmax(0, 1.2fr) 4.5rem var(--grip-col,); align-items: center; gap: 8px; }
/* Change 58: in a playlist each song ends with three lines to drag it up or down */
#listing.reorder { --grip-col: 2.4rem; }
.c-grip, .t-grip { display: none; }
#listing.reorder .c-grip, #listing.reorder .t-grip { display: flex; justify-content: center; }
.t-grip { touch-action: none; cursor: grab; padding: .35rem 0; }
.t-grip svg { width: 1.3rem; height: 1.3rem; fill: var(--muted); }
/* Change 59: no scroll anchoring while a song is dragged: the browser kept chasing the moved rows and raced to the end */
html.drag-on, html.drag-on body, html.drag-on .list { overflow-anchor: none; }
.trk.dragging { background: var(--raised); outline: 1px solid var(--accent); cursor: grabbing; }
.trk.dragging .t-grip svg { fill: var(--accent); }
.list-cols { color: var(--muted); font-size: .8rem; letter-spacing: 1px; padding: 6px 4px; border-bottom: 1px solid var(--border); }
.c-time { text-align: right; }
.list { flex: 1; overflow-y: auto; min-height: 0; outline-offset: -2px; }
.trk { padding: .5rem 4px; border-bottom: 1px solid var(--border); cursor: default; }
.trk:hover { background: var(--raised); }
.trk.sel { background: var(--hover); }
.trk.playing { color: var(--accent); font-weight: 600; }
.trk span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trk .t-time { text-align: right; font-variant-numeric: tabular-nums; }
.trk .t-title svg { width: .9em; height: .9em; fill: var(--accent); margin-right: .45em; vertical-align: -1px; }
.trk.folder { cursor: pointer; font-weight: 600; }
.trk .t-ico { display: flex; justify-content: center; }
.trk .t-ico svg { width: 1.5rem; height: 1.5rem; fill: var(--accent); }
.rowplay { background: none; border: none; width: 2rem; height: 2rem; padding: .45rem; border-radius: 50%; }
.rowplay svg { width: 100%; height: 100%; fill: var(--muted); display: block; }
.rowplay:hover { background: var(--accent); }
.rowplay:hover svg { fill: var(--on-accent); }
.drop { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted);
  font-size: 1.2rem; border: 2px dashed var(--border); border-radius: 14px; }
#dragveil { position: fixed; inset: 0; z-index: 50; background: rgba(15, 14, 13, .82); display: flex; align-items: center; justify-content: center; }
#dragveil div { border: 3px dashed var(--accent); border-radius: 18px; padding: 3rem 4rem; font-size: 1.5rem; color: #F3EDE7; }

/* sound panel */
.tabs { display: flex; }
.tab { flex: 1; background: none; border: none; border-bottom: 3px solid transparent; padding: .55rem .2rem; color: var(--muted); font-weight: 600; }
.tab.on { color: var(--text); border-bottom-color: var(--accent); }
.page { display: flex; flex-direction: column; gap: 9px; flex: 1; }
.eq { display: grid; grid-template-columns: repeat(10, 1fr); height: 250px; margin-top: 4px; }
.vs { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.vs-val, .vs-name { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.vs-body { flex: 1; width: 100%; position: relative; cursor: pointer; touch-action: none; outline: none; }
.vs-body::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 6px; margin-left: -3px; border-radius: 3px; background: var(--raised); }
.vs-body::after { content: ""; position: absolute; left: 25%; right: 25%; top: 50%; height: 1px; background: var(--border); }
.vs-knob { position: absolute; left: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--accent); top: 50%; z-index: 1; }
.vs-body:focus-visible .vs-knob { box-shadow: 0 0 0 3px var(--text); }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.meters { display: flex; justify-content: space-between; min-height: 1.2rem; margin-top: auto; }
.clip { color: var(--danger); font-weight: 700; }

/* dialog */
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 14px; padding: 22px 24px; width: min(34rem, 92vw); max-height: 90vh; }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog h2 { margin: 0 0 14px; font-size: 1.3rem; }
dialog .field { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; }
dialog .field select { flex: none; width: 16rem; max-width: 60%; }
dialog .stack { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
dialog input[type="text"], dialog input[type="number"] { width: 100%; }
dialog p { margin: 8px 0; white-space: pre-line; }
.menu-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }

.nav::-webkit-scrollbar, .list::-webkit-scrollbar, #right::-webkit-scrollbar { width: 10px; }
.nav::-webkit-scrollbar-thumb, .list::-webkit-scrollbar-thumb, #right::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }

#mobnav { display: none; }
.status-lib { display: none; }

/* medium screens: narrower side panels */
@media (max-width: 1280px) {
  #app { grid-template-columns: 13.5rem minmax(0, 1fr) 23rem; gap: 10px; padding: 10px; }
  .art { width: 150px; height: 150px; }
  .c-album, .trk .t-album { display: none; }
  .list-cols, .trk { grid-template-columns: 2.4rem minmax(0, 2fr) minmax(0, 1.2fr) 4.5rem var(--grip-col,); }
}

/* tablet + phone: one section at a time with a bottom bar */
@media (max-width: 980px) {
  body { overflow: hidden; }
  #app { display: block; padding: 10px 10px calc(70px + env(safe-area-inset-bottom)); height: 100%; overflow-y: auto; }
  #left, #right, #center { display: none; }
  #app[data-tab="library"] #left { display: flex; margin-bottom: 10px; }
  #app[data-tab="sound"] #right { display: flex; min-height: 100%; }
  #app[data-tab="player"] #center { display: flex; min-height: 100%; }
  .status-lib { display: block; min-height: 1.4rem; text-align: center; color: var(--accent); font-weight: 600; }
  /* Library tab: the songs of All Tracks, Favorites or the playlist he pressed show under the list (Carlos, Oct 4 2026) */
  #app[data-tab="library"] #center { display: flex; }
  #app[data-tab="library"] #player { display: none; }
  .nav { flex: none; max-height: none; overflow: visible; }
  #listing { min-height: 24rem; }
  .list { overflow: visible; }
  #ads { grid-template-columns: 1fr; margin-top: 14px; }
  .ad { height: 6.5rem; }
  .ad-a .ad-track { font-size: 2rem; } .ad-b .ad-track { font-size: 1.8rem; } .ad-c .ad-track { font-size: 1.6rem; }
  #credit { padding: 16px 8px 6px; line-height: 1.9; }
  #credit .howto { display: block; font-size: 1.1rem; }
  #credit .howto-dot { display: none; }
  #faces { margin-bottom: 10px; }
  #app[data-face="radio"] #radio { min-height: 100%; }
  #app[data-face="radio"] ~ #mobnav { display: none; }
  #mobnav {
    display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--panel); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom);
  }
  #mobnav button { background: none; border: none; padding: 1.1rem 0; color: var(--muted); font-weight: 600; font-size: 1.050rem; }
  #mobnav button.on { color: var(--accent); }
  .btn { padding: .8rem 1rem; }
  .btn.small { padding: .8rem .3rem; }
  .eq { height: 280px; }
}
@media (max-width: 600px) {
  #player { padding: 18px 14px 14px; }
  .now { flex-direction: column; text-align: center; gap: 12px; position: relative; }
  .art { width: min(62vw, 260px); height: min(62vw, 260px); }
  .heart { position: absolute; right: 0; top: 0; }
  .title { font-size: 1.4rem; }
  .controls { grid-template-columns: 1fr; gap: 8px; justify-items: center; }
  .controls > .flat { justify-self: center; order: 2; }
  .right-flats { justify-self: center; order: 3; }
  .transport { gap: 26px; }
  .play-btn { width: 84px; height: 84px; }
  .icon-btn { width: 62px; height: 62px; }
  .list-head { flex-wrap: wrap; }
  #search { width: 100%; max-width: none; }
  .c-artist, .trk .t-artist { display: none; }
  .list-cols, .trk { grid-template-columns: 2.6rem minmax(0, 1fr) 4rem var(--grip-col,); }
  .rowplay { width: 2.4rem; height: 2.4rem; }
  .volume .section { display: none; }
  .now { padding-top: 46px; }
  .heart { width: 46px; height: 46px; }
  dialog .field { flex-direction: column; align-items: stretch; gap: 4px; }
  dialog .field select { width: 100%; max-width: none; }
}

/* Change 108: the Spanish switch, one small word at the top right, outside the layout */
.lang { position: fixed; top: 58px; right: 22px; z-index: 40; background: none; border: none; padding: 4px 6px; color: var(--accent); font-size: .82rem; letter-spacing: .5px; cursor: pointer; opacity: .85; }
.lang:hover { opacity: 1; text-decoration: underline; }
@media (max-width: 760px) { .lang { top: 56px; right: 12px; } }
/* Change 112: Google Drive folders as small computer-style rows, so a list of 100+ folders scrolls easily */
.btn.drive-folder { display: flex; align-items: center; gap: .6em; text-align: left; justify-content: flex-start; padding: .45em .8em; }
.btn.drive-folder svg { width: 1.2em; height: 1.2em; flex: none; fill: var(--accent); }
.btn.drive-folder span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
