/* 22 October: requested refinements on top of the accepted component/animation baseline. */
/* A docked guide has no portrait, so its copy must occupy the whole available column. */
body .quest.quest-dock .quest-body { display:block; padding:12px 14px; }
body .quest.quest-dock .quest-copy { min-width:0; }
body .quest.quest-dock .quest-card { max-height:min(440px, calc(100dvh - var(--pl-h,76px) - var(--tab-h,0px) - 90px)); overflow:auto; overscroll-behavior:contain; }
body .quest.quest-dock .quest-title { font:700 18px/1.3 var(--ui); min-height:0; margin-bottom:9px; }
body .quest.quest-dock .quest-steps li { grid-template-columns:24px minmax(0,1fr); }
body .quest.quest-dock .quest-bar { padding:7px 12px; }
body .quest.quest-dock .quest-actions { padding:8px 12px; }
body .quest.quest-dock .quest-steps,body .quest.quest-dock .quest-reward { display:none; }
body .quest.quest-dock .quest-title { margin:0; font-size:16px; }
body .quest.quest-dock .quest-body { padding:8px 14px; }
body .quest.quest-dock .quest-actions button { min-height:30px; padding:5px 12px; }
.collection-tools { display:flex; align-items:center; gap:8px; min-height:32px; margin:0 0 8px; font:600 11px var(--ui); color:var(--muted,#706a60); }
body #archive-tools { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
body #archive-tools #likes-check,body .collection-tools .update-check { margin-left:auto!important; flex:0 0 auto; }
body .update-check { min-height:26px!important; height:auto!important; padding:4px 8px!important; font:600 10px/1.2 var(--ui)!important; letter-spacing:.02em!important; white-space:nowrap; background:#141b19!important; color:#f5edda!important; border:1px solid #141b19!important; box-shadow:2px 2px #ff5b1c55!important; }
body .update-check:hover { border-color:#ff5b1c!important; }
/* Redundant feed scan moved to the common row above the genre panel. */
body [data-empty-clear] { max-width:100%; }
.track-cloud { display:inline-block!important; width:12px!important; height:8px!important; margin-left:5px; vertical-align:baseline; fill:#ff5b1c; flex:0 0 auto; }
body .r-title a { color:inherit; text-decoration:none; }
body .r-title a:hover { text-decoration:underline; text-decoration-color:#ff5b1c; text-underline-offset:3px; }
body .r-titleline .tag,body .c-sub .tag,body .feed-genre { font:600 12px/1.15 var(--ui)!important; padding:1px 4px!important; min-height:0!important; max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body .r-titleline .r-title { font-size:12px!important; }
body #shell .row.current { box-shadow:inset 2px 0 #ff5b1c!important; }
body .row>.r-num { padding-left:7px; }
/* A small battle invitation borrows the arena's orange/cyan frame and quiet city detail. */
body .battle-invite { color:#fff3d9!important; background:linear-gradient(110deg,#211b36ee,#183b42ed),url('/web/art/blend-stage-v1.webp') center 55%/cover!important; border:2px solid #70d5df!important; border-left-color:#ff7136!important; box-shadow:2px 2px 0 #261b3a!important; font-weight:700!important; letter-spacing:.03em; position:relative; }
body .battle-invite::before { content:'VS'; display:inline-block; font:800 10px/1 var(--ui); color:#ffb879; margin-right:7px; text-shadow:1px 1px #0c1017; }
body .battle-invite:hover,body .battle-invite:focus-visible { background:linear-gradient(110deg,#493253,#1e555b)!important; box-shadow:2px 2px #ff7833!important; }
body #person-modes [data-person-mode="blend"] { min-height:42px; padding:8px 14px; font-size:13px; }
body .explore-layout { width:100%; }
body .explore-network { width:min(100%,1080px)!important; max-width:1080px!important; margin-inline:auto!important; }
body #w-discover { width:100%; max-width:none!important; }
body .discover-head { display:grid!important; grid-template-columns:minmax(0,1fr)!important; justify-items:center; gap:14px!important; padding:20px 18px!important; text-align:center; }
body .discover-head>div:first-child { width:100%; }
body .discover-head .disc-title { font-size:20px!important; }
body #discover-q { width:min(100%,470px)!important; }
body #discover-rel { width:100%; justify-content:center; flex-wrap:wrap; }
body .people-sort { display:flex!important; flex-direction:column; align-items:center; justify-content:center; gap:6px; width:100%; border:0!important; box-shadow:none!important; background:none!important; padding:0!important; }
body.personal #discover-rescan { display:inline-flex!important; }
body #discover-sort { min-width:230px; min-height:40px; padding:8px 12px; font:600 13px var(--ui); background:#fff7e5!important; border:2px solid #201f19!important; box-shadow:2px 2px #a68e68; }
body .discover-actions { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:10px; }
body .discover-actions .pick-control small { display:none; }
body #discover-list { max-width:none!important; width:100%!important; margin-inline:auto; }
body #discover-list .p-row { padding:14px 16px!important; }
body .dig-results.grid { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:12px; }
body .dig-results .card { min-width:0; }
body .dig-results .c-sub { flex-wrap:wrap; }
/* The map lives above the player; bound its card to that available space. */
body #taste-modal .taste-card { max-height:calc(100dvh - var(--pl-h,76px) - var(--tab-h,0px) - var(--safe-b,0px) - 48px)!important; min-height:0; margin:0!important; }
body #taste-modal .modal-head { position:sticky; top:-1px; z-index:2; background:var(--paper,#f8efda); padding-block:6px; }
body .dig-results .card { margin:0!important; padding:0 0 9px!important; }
/* An honest immediate cue while an uncached waveform arrives; no invented audio peaks. */
.wave-loading { background:linear-gradient(90deg,transparent,#ff6c2726,transparent); background-size:200% 100%; animation:wave-pending 1.3s linear infinite; }
@keyframes wave-pending { from{background-position:150% 0}to{background-position:-50% 0} }
.pull-refresh { position:fixed; top:calc(var(--hdr-h,52px) + 8px); left:50%; z-index:170; padding:10px 18px; background:#152420; color:#fff1cf; border:2px solid #ff6b2c; box-shadow:3px 3px #101714; font:600 12px var(--ui); pointer-events:none; opacity:0; transform:translate(-50%,-55px); transition:transform 180ms ease,opacity 180ms ease; }
.pull-refresh.is-visible { opacity:1; transform:translate(-50%,var(--pull-y,0px)); }
@media(max-width:760px) {
 body .quest.quest-dock .quest-card { max-height:min(330px,calc(100dvh - 210px)); }
 body #archive-tools { gap:4px; }
 body #archive-tools #likes-check { padding:4px 5px!important; font-size:9px!important; }
 body .collection-tools { min-height:30px; }
 body .discover-head { padding:16px 12px!important; gap:12px!important; }
 body #discover-list .p-row { padding:12px 8px!important; }
 body #discover-sort { width:min(100%,300px); }
 body .r-titleline .r-title { font-size:13px!important; }
 body .dig-results.grid { gap:8px; }
 body .battle-invite::before { margin-right:4px; }
}
@media(prefers-reduced-motion:reduce) { .wave-loading { animation:none; } .pull-refresh { transition:none; } }
body.calm-motion .wave-loading { animation:none; }
/* Keep the complete ridge above the player instead of hiding its base behind the bar. */
@media(min-width:761px){body::after{bottom:var(--ftr,72px);height:32px;z-index:95;background-size:auto 100%;}}
