/* Re:Vault - settings & policy pages. Inherits tokens from theme.css. */
html, body.rv-page { height: auto; overflow: auto; background: var(--bg); }
body.rv-page { display: flex; flex-direction: column; min-height: 100vh; color: var(--fg-2); }

.rv-page-head { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 5; }
.rv-page-brand { display: flex; align-items: center; gap: 8px; color: var(--fg); font-weight: 600; text-decoration: none; }
.rv-page-brand svg { width: 22px; height: 22px; }
.rv-page-title { font-size: 16px; color: var(--muted-2); font-weight: 500; }
.rv-page-foot { padding: 20px 22px 40px; color: var(--muted); font-size: 12px; }
.rv-page-foot a { color: var(--muted-2); }

.rv-set { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 22px 60px; }
.rv-section { margin-top: 28px; }
.rv-section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--accent-ink); margin-bottom: 8px; padding-left: 2px; }
.rv-section-body { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.rv-row { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-top: 1px solid var(--line); }
.rv-row:first-child { border-top: 0; }
/* labeled sub-group divider inside a section body */
.rv-group { padding: 13px 16px 5px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); border-top: 1px solid var(--line); }
.rv-group:first-child { border-top: 0; }
.rv-group + .rv-row { border-top: 0; }
.rv-row-text { flex: 1; min-width: 0; }
.rv-row-label { color: var(--fg); font-size: 14px; }
.rv-row-desc { color: var(--muted); font-size: 12px; margin-top: 2px; line-height: 1.4; }
.rv-row-control { flex: none; display: flex; align-items: center; gap: 8px; }

/* controls */
.rv-switch { width: 42px; height: 24px; border-radius: 13px; border: 1px solid var(--line-strong); background: var(--surface-2); position: relative; transition: background 0.15s, border-color 0.15s; }
.rv-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted-2); transition: transform 0.15s, background 0.15s; }
.rv-switch[data-on="1"] { background: var(--accent); border-color: var(--accent); }
.rv-switch[data-on="1"]::after { transform: translateX(18px); background: var(--on-accent); }
@media (forced-colors: active) {
	.rv-switch { forced-color-adjust: none; border-color: ButtonText; background: Canvas; }
	.rv-switch::after { background: ButtonText; }
	.rv-switch[data-on="1"] { background: Highlight; border-color: Highlight; }
	.rv-switch[data-on="1"]::after { background: HighlightText; }
	.rv-set-link[aria-current="page"] { border-left-color: Highlight; }
	.rv-row.rv-hit { outline: 2px solid Highlight; }
	.rv-pin[aria-pressed="true"] { border-color: Highlight; }
}
.rv-select, .rv-input { height: 34px; min-width: 170px; max-width: 220px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--fg); border-radius: var(--radius); padding: 0 10px; font: inherit; font-size: 13px; outline: none; }
.rv-input { user-select: text; -webkit-user-select: text; }
.rv-select:focus, .rv-input:focus { border-color: var(--accent); }
.rv-color { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rv-color input[type="color"] { width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: none; cursor: pointer; }
.rv-swatch { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.18); cursor: pointer; }
.rv-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--fg); }
.rv-locked { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; padding: 6px 10px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* prose (policy pages) */
.rv-prose { width: 100%; max-width: 720px; margin: 0 auto; padding: 16px 22px 64px; color: var(--fg-2); line-height: 1.65; }
.rv-prose h1 { color: var(--fg); font-size: 26px; margin: 18px 0 8px; }
.rv-prose h2 { color: var(--fg); font-size: 18px; margin: 26px 0 8px; }
.rv-prose p, .rv-prose li { font-size: 14px; }
.rv-prose ul { padding-left: 22px; margin: 8px 0; }
.rv-prose a { color: var(--accent-ink); }
.rv-prose .rv-updated { color: var(--muted); font-size: 12px; }
.rv-prose .rv-version { color: var(--muted); font-size: 12.5px; margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line); }
.rv-prose .rv-version strong { color: var(--fg-2); }
.rv-prose .rv-version code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 11.5px; color: var(--fg-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }

/* range slider with live value readout */
.rv-range { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.rv-range input[type="range"] { flex: 1; accent-color: var(--accent); height: 22px; cursor: pointer; }
.rv-range-val { flex: none; min-width: 42px; text-align: right; color: var(--fg-2); font-size: 12px; font-variant-numeric: tabular-nums; }

/* one-click looks: each tile is a small start page in that look (shared/look-preview.js) */
.rv-looks { display: flex; flex-direction: column; gap: 18px; }
.rv-looks-h { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; }
.rv-bundles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.rv-bundle-wrap { position: relative; }
.rv-bundle { position: relative; display: flex; flex-direction: column; width: 100%; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); color: var(--fg); padding: 0; text-align: left; transition: border-color 0.12s ease, transform 0.12s ease; }
.rv-bundle:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.rv-bundle.active { border-color: var(--accent-ink); box-shadow: 0 0 0 1px var(--accent-ink); }
.rv-bundle-cap { display: flex; align-items: center; gap: 8px; padding: 7px 9px; font-size: 12px; font-weight: 600; border-top: 1px solid var(--line); }
.rv-bundle-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-bundle-accent { flex: none; width: 12px; height: 12px; border-radius: 3px; box-shadow: 0 0 0 1px var(--line-strong); }
.rv-bundle-check { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; display: none; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-ink); color: var(--bg); box-shadow: 0 0 0 2px var(--surface); }
.rv-bundle-check svg { width: 12px; height: 12px; }
.rv-bundle.active .rv-bundle-check { display: flex; }
/* delete is a real, focusable sibling button - hidden (and click-through) until the
   tile is hovered or focused, so it's never an invisible touch hotspot */
.rv-bundle-del { position: absolute; top: 5px; left: 5px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: var(--radius-sm); background: rgba(0, 0, 0, 0.6); color: #fff; opacity: 0; pointer-events: none; transition: opacity 0.12s ease, background 0.12s ease; }
.rv-bundle-del svg { width: 12px; height: 12px; }
.rv-bundle-wrap:hover .rv-bundle-del, .rv-bundle-wrap:focus-within .rv-bundle-del { opacity: 1; pointer-events: auto; }
@media (hover: none), (any-pointer: coarse) { .rv-bundle-del { opacity: 1; pointer-events: auto; } }
.rv-bundle-del:hover, .rv-bundle-del:focus-visible { background: var(--danger); }
/* shuffle tile - a dashed action tile (not a .rv-bundle, so it's skipped by active-sync) */
.rv-bundle-shuffle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 100%; min-height: 96px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); color: var(--muted-2); font-size: 12px; font-weight: 600; transition: border-color 0.12s ease, transform 0.12s ease, color 0.12s ease; }
.rv-bundle-shuffle svg { width: 22px; height: 22px; }
.rv-bundle-shuffle:hover { border-color: var(--accent-2); color: var(--fg-2); transform: translateY(-2px); }
.rv-bundle-wrap:has(.rv-bundle-shuffle) { display: flex; }
.rv-looks-more { display: none; margin-top: 10px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: transparent; color: var(--fg-2); font: inherit; font-size: 13px; }
.rv-looks-more:hover { border-color: var(--accent-2); color: var(--fg); }
@media (max-width: 599px) {
	.rv-bundles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.rv-looks-collapsible:not(.open) .rv-bundle-wrap:nth-child(n + 5) { display: none; }
	.rv-looks-more { display: inline-flex; align-items: center; }
}

/* wallpaper picker */
.rv-row-block { flex-direction: column; align-items: stretch; gap: 12px; }
.rv-walls { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; }
.rv-wall { position: relative; aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background-color: var(--surface-2); background-size: cover; background-position: center; color: var(--fg); padding: 0; transition: border-color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease; }
.rv-wall:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.rv-wall.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.rv-wall.none { background-image: repeating-linear-gradient(45deg, var(--surface) 0 8px, var(--surface-2) 8px 16px); }
.rv-wall.action { display: flex; align-items: center; justify-content: center; }
.rv-wall-cap { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 5px; padding: 5px 8px; font-size: 11px; color: #fff; background: linear-gradient(to top, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0)); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); }
.rv-wall.action .rv-wall-cap, .rv-wall.none .rv-wall-cap { position: static; justify-content: center; flex-direction: column; gap: 6px; padding: 0; background: none; color: var(--muted-2); text-shadow: none; width: 100%; height: 100%; }
.rv-wall-cap svg { width: 15px; height: 15px; flex: none; }
/* High Contrast has no text shadows, so a picture's name sits on a solid bar instead of the fade */
:root[data-theme="contrast"] .rv-wall:not(.action):not(.none) .rv-wall-cap { background: #000; color: #fff; border-top: 1px solid #fff; }
.rv-wall.action .rv-wall-cap svg, .rv-wall.none .rv-wall-cap svg { width: 22px; height: 22px; }
.rv-wall-check { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; padding: 2px; border-radius: 50%; background: var(--accent); color: var(--on-accent); opacity: 0; transform: scale(0.6); transition: opacity 0.12s ease, transform 0.12s ease; }
.rv-wall.active .rv-wall-check { opacity: 1; transform: scale(1); }

/* multi-toggle (start-shortcut visibility) */
.rv-multi { display: grid; grid-template-columns: repeat(2, minmax(140px, 1fr)); gap: 8px 18px; }
.rv-multi-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rv-multi-item span { color: var(--fg-2); font-size: 13px; }

/* school bell: active-day chips */
.rv-days { display: flex; gap: 6px; flex-wrap: wrap; }
.rv-day { width: 32px; height: 32px; flex: none; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--muted-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease; }
.rv-day:hover { border-color: var(--accent-2); color: var(--fg-2); }
.rv-day[data-on="1"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* school bell: schedule editor + music: playlist */
.rv-sched, .rv-tracks { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.rv-sched-list, .rv-tracks-list { display: flex; flex-direction: column; gap: 8px; }
.rv-sched-empty { color: var(--muted); font-size: 13px; padding: 4px 2px; }
.rv-sched-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rv-sched-row .rv-sched-time { min-width: 0; width: 130px; flex: none; }
.rv-sched-row .rv-sched-label { min-width: 120px; flex: 1 1 160px; max-width: none; }
.rv-sched-del { width: 32px; height: 32px; flex: none; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.rv-sched-del:hover { color: var(--danger); border-color: var(--danger); }
.rv-sched-add { align-self: flex-start; }
.rv-track-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.rv-track-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-2); font-size: 13px; }

/* help page: keyboard shortcuts */
kbd { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: var(--radius-sm); padding: 1px 6px; color: var(--fg); }
.rv-help-note { color: var(--muted); font-size: 12px; font-style: italic; margin: 6px 0; }
.rv-keys { width: 100%; border-collapse: collapse; margin: 10px 0 18px; }
.rv-keys td { padding: 7px 10px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
.rv-keys td:first-child { white-space: nowrap; width: 1%; }
.rv-keys td:last-child { color: var(--fg-2); }
.rv-prose h3 { color: var(--fg); font-size: 15px; margin: 18px 0 6px; }

@media (max-width: 560px) {
	.rv-row { flex-direction: column; align-items: stretch; gap: 10px; }
	.rv-row-control { justify-content: flex-start; }
	.rv-select, .rv-input { max-width: none; width: 100%; }
	.rv-multi { grid-template-columns: 1fr; }
}

/* Account section */
.rv-account { display: flex; flex-direction: column; gap: 12px; padding: 4px 16px 16px; }
.rv-account-note { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 0; }
.rv-account-who { display: flex; align-items: center; gap: 12px; }
.rv-account-av { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 18px; display: flex; align-items: center; justify-content: center; flex: none; }
.rv-account-meta { display: flex; flex-direction: column; }
.rv-account-name { font-size: 15px; font-weight: 600; color: var(--fg); }
.rv-account-email { font-size: 12.5px; color: var(--muted); }
.rv-account-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.rv-account-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--surface-2); color: var(--fg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; font-size: 13.5px; z-index: 60; box-shadow: 0 6px 20px rgba(0,0,0,0.4); }

.rv-select:focus-visible, .rv-input:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 1px; }

/* Narrow screens: control groups (colour swatches) wrap instead of running off the edge. */
@media (max-width: 560px) { .rv-row-control { max-width: 100%; flex-wrap: wrap; min-width: 0; } }
/* privacy card (Settings, Privacy & data) */
.rv-privcard { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.rv-privcard-title { margin: 0; color: var(--fg); font-size: 14px; font-weight: 600; }
.rv-privcard-list { margin: 8px 0 8px; padding-left: 18px; color: var(--fg-2); font-size: 13px; line-height: 1.5; }
.rv-privcard-list li + li { margin-top: 3px; }
.rv-privcard-link { color: var(--accent-ink); font-size: 13px; }

/* trust strip on /privacy (base styles in theme.css) */
.rv-prose .rv-trust { margin: 4px 0 18px; text-align: left; font-size: 12.5px; }
.rv-prose .rv-trust a { color: var(--muted-2); }
.rv-prose table { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: 13px; line-height: 1.45; }
.rv-prose th, .rv-prose td { text-align: left; vertical-align: top; padding: 8px 10px; border-top: 1px solid var(--line); }
.rv-prose th { color: var(--fg); font-weight: 600; background: var(--surface); }
.rv-prose .rv-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rv-prose .rv-part { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
.rv-prose h3 { color: var(--fg); font-size: 15px; margin: 20px 0 6px; }
@media (max-width: 640px) {
	.rv-prose table, .rv-prose tbody, .rv-prose tr, .rv-prose td { display: block; width: 100%; }
	.rv-prose thead { display: none; }
	.rv-prose tr { border-top: 1px solid var(--line); padding: 8px 0; }
	.rv-prose td { border: 0; padding: 3px 0; }
	.rv-prose td::before { content: attr(data-l) ": "; color: var(--fg); font-weight: 600; }
	.rv-prose td:first-child { color: var(--fg); font-weight: 600; }
	.rv-prose td:first-child::before { content: none; }
}

/* Account: ways to sign in, recent sign-ins, delete */
.rv-ways { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.rv-ways-h { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--fg); }
.rv-ways-list { display: flex; flex-direction: column; gap: 6px; }
.rv-ways-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.rv-way { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.rv-way-text { flex: 1 1 180px; min-width: 0; }
.rv-way-name { font-size: 14px; font-weight: 600; color: var(--fg); overflow-wrap: anywhere; }
.rv-way-detail { font-size: 12.5px; color: var(--muted); }
.rv-way-acts { display: flex; gap: 6px; }
.rv-way-ev { padding: 6px 12px; }
.rv-way-confirm { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; }
.rv-way-check { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--fg-2); }
.rv-ways-nudge { color: var(--fg-2); }

/* Settings v2: a rail of sections on the left, one section at a time on the right */
.rv-set-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 28px; align-items: start; }
.rv-set-rail { position: sticky; top: 61px; display: flex; flex-direction: column; gap: 12px; padding: 18px 0 16px; max-height: calc(100vh - 61px); overflow-y: auto; }
.rv-set-search { position: relative; }
.rv-set .rv-set-q { width: 100%; min-width: 0; max-width: none; height: 38px; }
.rv-set-results { position: absolute; left: 0; top: calc(100% + 4px); z-index: 20; width: max(100%, 300px); max-height: 60vh; overflow-y: auto; padding: 4px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }
.rv-set-results[hidden] { display: none; }
.rv-set-opt { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.rv-set-opt:hover { background: var(--surface-2); }
.rv-set-opt[aria-selected="true"] { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent-ink); }
.rv-set-opt-name { color: var(--fg); font-size: 13.5px; }
.rv-set-opt-where { color: var(--muted); font-size: 11.5px; }
.rv-set-none { padding: 10px; color: var(--muted); font-size: 13px; }
.rv-set-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rv-set-link { display: flex; flex-direction: column; justify-content: center; min-height: 40px; padding: 6px 12px; border-radius: var(--radius); border-left: 3px solid transparent; color: var(--fg-2); text-decoration: none; }
.rv-set-link-name { font-size: 14px; }
.rv-set-link-sum { display: none; font-size: 12px; color: var(--muted); line-height: 1.35; }
.rv-set-link:hover { background: var(--surface); color: var(--fg); }
.rv-set-link[aria-current="page"] { background: var(--surface-2); border-left-color: var(--accent-ink); color: var(--fg); font-weight: 600; }
.rv-set-pick { display: none; }
.rv-set-railfoot { margin: 6px 12px 0; color: var(--muted); font-size: 12px; }
.rv-set-railfoot a { color: var(--muted-2); }
.rv-set-main { min-width: 0; padding-top: 18px; }
.rv-sec-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; position: relative; }
.rv-sec-title { flex: 1; min-width: 200px; }
.rv-sec-title h2 { margin: 0; color: var(--fg); font-size: 20px; font-weight: 650; }
.rv-sec-title h2:focus { outline: none; }
.rv-sec-title h2:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }
.rv-sec-sum { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.rv-sec-back { display: none; }
.rv-grp { margin-top: 22px; }
h3.rv-group { margin: 0; padding: 0 2px 7px; border: 0; }
.rv-danger .rv-section-body { border-color: color-mix(in srgb, var(--danger) 60%, var(--line)); }
/* sub-settings sit under their parent, indented with a rule */
.rv-dep { margin: 0 0 0 18px; border-left: 2px solid var(--line-strong); }
.rv-dep[hidden], .rv-row[hidden] { display: none; }
.rv-dep > .rv-row { border-top: 1px solid var(--line); padding-left: 14px; }
.rv-row-hint { margin-top: 3px; color: var(--muted); font-size: 12px; }
.rv-row-hint[hidden] { display: none; }
.rv-row-why, .rv-row-note { margin-top: 4px; color: var(--fg-2); font-size: 12.5px; font-weight: 600; }
.rv-row-note[hidden] { display: none; }
.rv-row.rv-hit { box-shadow: inset 0 0 0 2px var(--accent-ink); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); transition: box-shadow 0.2s ease, background 0.2s ease; }
.rv-row-link .rv-link-btn { white-space: nowrap; }
.rv-row-block > .rv-row-control { flex-direction: column; align-items: stretch; width: 100%; }
.rv-btnrow { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 260px; }
.rv-stack .rv-row-desc { text-align: right; }
.rv-looks-wrap { display: flex; flex-direction: column; gap: 14px; }
.rv-fold { display: flex; flex-direction: column; gap: 10px; }
.rv-fold-btn { align-self: flex-start; }
.rv-fold [hidden] { display: none !important; }
.rv-set-toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); padding: 10px 12px 10px 16px; background: var(--surface-2); color: var(--fg); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); font-size: 13.5px; }
/* one choice in a few words */
.rv-radios { display: flex; flex-wrap: wrap; gap: 6px; }
.rv-radio { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px 0 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill, 16px); color: var(--fg-2); font-size: 13px; cursor: pointer; }
.rv-radio input { margin: 0; accent-color: var(--accent); width: 16px; height: 16px; }
.rv-radio:has(input:checked) { border-color: var(--accent-ink); color: var(--fg); }
.rv-radio:has(input:focus-visible) { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.rv-disclose summary { display: inline-flex; align-items: center; min-height: 32px; cursor: pointer; color: var(--fg-2); font-size: 13px; }
.rv-disclose[open] summary { margin-bottom: 10px; }
.rv-keylist { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 13px; }
.rv-keylist dt { margin: 0; }
.rv-keylist dd { margin: 0; color: var(--fg-2); }
/* extension rows: "In toolbar" beside the switch */
.rv-extctl { display: flex; align-items: center; gap: 10px; }
.rv-pin { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill, 16px); background: transparent; color: var(--muted-2); font: inherit; font-size: 12px; cursor: pointer; }
.rv-pin svg { width: 13px; height: 13px; }
.rv-pin[aria-pressed="true"] { border-color: var(--accent-ink); color: var(--fg); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.rv-pinlist-ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rv-pinlist-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.rv-pinlist-ic { display: inline-flex; width: 20px; height: 20px; color: var(--fg-2); }
.rv-pinlist-ic svg { width: 20px; height: 20px; }
.rv-pinlist-name { flex: 1; min-width: 100px; color: var(--fg); font-size: 13.5px; }
.rv-music-uploads { display: flex; flex-direction: column; gap: 10px; }

@media (any-pointer: coarse) {
	.rv-set-link, .rv-btn, .rv-pin, .rv-radio, .rv-disclose summary, .rv-set-opt { height: auto; min-height: 44px; }
	.rv-switch { width: 48px; height: 28px; border-radius: 15px; }
	.rv-switch::after { width: 22px; height: 22px; }
	.rv-switch[data-on="1"]::after { transform: translateX(20px); }
}
@media (prefers-reduced-motion: reduce) { .rv-row.rv-hit { transition: none; } }
:root[data-perf="on"] .rv-row.rv-hit { transition: none; }

/* 600 to 899 px: the rail becomes a row with search and a section picker */
@media (max-width: 899px) {
	.rv-set-shell { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.rv-set-rail { position: static; max-height: none; overflow: visible; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 10px; padding: 14px 0 0; }
	.rv-set-nav, .rv-set-railfoot { display: none; }
	.rv-set-pick { display: block; }
	.rv-set .rv-set-pick select { width: 100%; max-width: none; height: 38px; }
}
/* phones: a list of sections, then one section full width with a back arrow */
@media (max-width: 599px) {
	.rv-set { padding: 0 16px 48px; }
	.rv-set-rail { display: flex; flex-direction: column; align-items: stretch; }
	.rv-set-pick { display: none; }
	body[data-view="list"] .rv-set-nav { display: block; }
	body[data-view="list"] .rv-set-railfoot { display: block; }
	body[data-view="list"] .rv-set-main { display: none; }
	body[data-view="section"] .rv-set-rail { display: none; }
	.rv-set-link { min-height: 56px; padding: 8px 14px; border: 1px solid var(--line); border-left-width: 1px; background: var(--surface); }
	.rv-set-nav ul { gap: 8px; }
	.rv-set-link-sum { display: block; }
	.rv-set-link::after { content: ""; }
	.rv-sec-back { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: -10px; border: 0; border-radius: var(--radius); background: transparent; color: var(--fg); }
	.rv-sec-back svg { width: 20px; height: 20px; }
	.rv-sec-reset { order: 3; }
	.rv-dep { margin-left: 8px; }
	.rv-extctl { flex-wrap: wrap; }
	.rv-stack { align-items: flex-start; max-width: none; }
	.rv-stack .rv-row-desc { text-align: left; }
}
/* supporter perk choices (Settings > Supporter and the Supporter page) */
.sp-colors { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; min-width: 0; }
.sp-colors legend { margin-bottom: 8px; padding: 0; }
.sp-color { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 2px 10px 2px 6px; border: 1px solid var(--line); border-radius: 999px; color: var(--fg); font-size: 13px; cursor: pointer; }
.sp-color:has(input:checked) { border-color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-ink); }
.sp-color input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.sp-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; }
.sp-dot[data-c="0"] { background: #5eead4; } .sp-dot[data-c="1"] { background: #c4b5fd; } .sp-dot[data-c="2"] { background: #fda4af; } .sp-dot[data-c="3"] { background: #fcd34d; }
.sp-dot[data-c="4"] { background: #7dd3fc; } .sp-dot[data-c="5"] { background: #bef264; } .sp-dot[data-c="6"] { background: #fdba74; } .sp-dot[data-c="7"] { background: #f0abfc; }
:root[data-mode="light"] .sp-dot[data-c="0"] { background: #0f6b63; } :root[data-mode="light"] .sp-dot[data-c="1"] { background: #6d28d9; }
:root[data-mode="light"] .sp-dot[data-c="2"] { background: #b4123a; } :root[data-mode="light"] .sp-dot[data-c="3"] { background: #8a3c0c; }
:root[data-mode="light"] .sp-dot[data-c="4"] { background: #035f91; } :root[data-mode="light"] .sp-dot[data-c="5"] { background: #3b5c11; }
:root[data-mode="light"] .sp-dot[data-c="6"] { background: #b03a0b; } :root[data-mode="light"] .sp-dot[data-c="7"] { background: #951a9f; }
.sp-color input:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
/* Supporter and early looks (shared/look-perks.js) */
.rv-bundle-tag { font-size: 10.5px; font-weight: 600; padding: 0 6px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.rv-look-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; color: var(--fg); font-size: 13px; }
.rv-look-try:empty { display: none; }
.rv-look-try span { flex: 1 1 240px; }
.rv-slots { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.rv-slots > .rv-btn { align-self: flex-start; }
.rv-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--fg-2); }
.rv-slot span { flex: 1 1 200px; }
