/* Relic Suggestions v1.7.0 — light theme matched to relicpve.com (white page, black header, red flame accent) */
.rsg {
	/* Tweak these to re-theme the whole board. */
	--rsg-bg: #ffffff;
	--rsg-panel: #ffffff;
	--rsg-panel-2: #f4f4f5;
	--rsg-border: #e5e5e7;
	--rsg-border-hi: #d4d4d8;
	--rsg-text: #111113;
	--rsg-text-2: #3f3f46;
	--rsg-muted: #71717a;
	--rsg-ink: #0b0b0c;          /* matches the black site header */
	--rsg-accent: #e0322a;       /* Relic flame red */
	--rsg-accent-hi: #c4241d;
	--rsg-accent-soft: #fdeeed;
	--rsg-down: #4f6bed;
	--rsg-down-soft: #eef1fe;
	--rsg-danger: #c62828;
	--rsg-radius: 10px;
	--rsg-shadow: 0 1px 2px rgba(16, 16, 20, .04), 0 2px 8px rgba(16, 16, 20, .04);
	--rsg-shadow-hi: 0 2px 4px rgba(16, 16, 20, .05), 0 8px 24px rgba(16, 16, 20, .08);

	position: relative;
	max-width: 960px;
	margin: 0 auto 3em;
	padding: 8px 0 0;
	background: transparent;
	color: var(--rsg-text);
	font-size: 15px;
	line-height: 1.55;
	text-align: left;
}
.rsg *, .rsg *::before, .rsg *::after { box-sizing: border-box; }
.rsg a { color: var(--rsg-accent); text-decoration: none; }
.rsg a:hover { color: var(--rsg-accent-hi); text-decoration: underline; }
.rsg h2, .rsg h3, .rsg p { margin: 0; padding: 0; border: 0; color: inherit; font-family: inherit; text-transform: none; letter-spacing: normal; }
.rsg svg { width: 1em; height: 1em; fill: currentColor; flex: none; }
.rsg button { font: inherit; text-transform: none; letter-spacing: normal; box-shadow: none; margin: 0; line-height: 1.2; }

/* Header */
.rsg-head {
	display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
	padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--rsg-border);
}
.rsg-h { font-size: 32px !important; font-weight: 800; color: var(--rsg-ink) !important; line-height: 1.15; letter-spacing: -0.01em !important; }
.rsg-h::after { content: ""; display: block; width: 44px; height: 3px; margin-top: 10px; background: var(--rsg-accent); border-radius: 2px; }
.rsg-sub { color: var(--rsg-muted); margin-top: 10px !important; font-size: 15px; max-width: 560px; }

/* Buttons & inputs */
.rsg-btn,
.rsg a.rsg-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 9px 16px; min-height: 40px;
	background: var(--rsg-panel); color: var(--rsg-text);
	border: 1px solid var(--rsg-border-hi); border-radius: 8px;
	font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
	transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.rsg-btn:hover, .rsg a.rsg-btn:hover { border-color: var(--rsg-ink); color: var(--rsg-ink); text-decoration: none; }
.rsg-btn:disabled { opacity: .45; cursor: default; }
.rsg-btn-gold, .rsg a.rsg-btn-gold { background: var(--rsg-accent); border-color: var(--rsg-accent); color: #fff; box-shadow: 0 1px 2px rgba(224, 50, 42, .25); }
.rsg-btn-gold:hover, .rsg a.rsg-btn-gold:hover { background: var(--rsg-accent-hi); border-color: var(--rsg-accent-hi); color: #fff; }
.rsg-btn-danger { background: transparent; border-color: rgba(198, 40, 40, .4); color: var(--rsg-danger); }
.rsg-btn-danger:hover { background: #fdecec; border-color: var(--rsg-danger); color: var(--rsg-danger); }
.rsg-btn.is-busy { opacity: .6; cursor: progress; }

.rsg-input,
.rsg-select {
	width: 100%; padding: 9px 12px; min-height: 40px; margin: 0;
	background: var(--rsg-panel); color: var(--rsg-text);
	border: 1px solid var(--rsg-border-hi); border-radius: 8px;
	font: inherit; font-size: 14px; box-shadow: none; line-height: 1.4;
}
.rsg-select { width: auto; cursor: pointer; padding-right: 30px; height: 40px; }
.rsg-input:focus, .rsg-select:focus { outline: none; border-color: var(--rsg-ink); box-shadow: 0 0 0 3px rgba(11, 11, 12, .08); }
.rsg-input::placeholder { color: #a1a1aa; }
.rsg-textarea { resize: vertical; min-height: 84px; line-height: 1.55; display: block; }

.rsg-link { background: none; border: 0; padding: 0; color: var(--rsg-muted); cursor: pointer; font-size: 13px; }
.rsg-link:hover { color: var(--rsg-text); text-decoration: underline; }
.rsg-link.rsg-danger:hover { color: var(--rsg-danger); }

/* Compose */
.rsg-compose {
	background: var(--rsg-panel); border: 1px solid var(--rsg-border);
	border-top: 3px solid var(--rsg-accent);
	border-radius: var(--rsg-radius); padding: 16px; margin-bottom: 20px;
	display: flex; flex-direction: column; gap: 10px;
	box-shadow: var(--rsg-shadow-hi);
}
.rsg-compose[hidden] { display: none; }
.rsg-compose-row { display: flex; gap: 10px; }
.rsg-grow { flex: 1; }
.rsg-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rsg-actions { display: flex; gap: 8px; }
.rsg-actions-split { justify-content: space-between; margin-top: 10px; }
.rsg-count { color: var(--rsg-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.rsg-count.is-under { color: var(--rsg-accent); }

/* Similar suggestions (in compose) */
.rsg-similar { padding: 12px; background: #fffaf0; border: 1px solid #f3dfb2; border-radius: 8px; }
.rsg-similar[hidden] { display: none; }
.rsg-similar.is-flash { animation: rsg-flash .8s ease 2; }
@keyframes rsg-flash { 50% { box-shadow: 0 0 0 3px #f0c46a; } }
.rsg-similar-h { color: #8a5a00; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.rsg-similar ul { list-style: none; margin: 0 !important; padding: 0 !important; display: flex; flex-direction: column; gap: 6px; }
.rsg-sim { display: flex; align-items: center; gap: 10px; margin: 0 !important; padding: 8px 10px; background: var(--rsg-panel); border: 1px solid var(--rsg-border); border-radius: 7px; }
.rsg-sim .rsg-vote { flex-direction: row; width: auto; gap: 4px; padding: 0; background: none; border: 0; }
.rsg-sim .rsg-vbtn { width: 28px; height: 26px; font-size: 13px; }
.rsg-sim .rsg-score { min-width: 22px; text-align: center; font-size: 14px; }
.rsg-sim-main { flex: 1; min-width: 0; }
.rsg .rsg-sim-title { color: var(--rsg-text); font-weight: 600; }
.rsg .rsg-sim-title:hover { color: var(--rsg-accent); text-decoration: none; }
.rsg-sim-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; color: var(--rsg-muted); font-size: 12px; }
.rsg-sim-meta .rsg-badge { font-size: 10px; padding: 0 6px; }

/* Toolbar */
.rsg-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.rsg-tabs { display: flex; gap: 2px; background: var(--rsg-panel-2); border-radius: 9px; padding: 4px; }
.rsg-tab { background: transparent; border: 0; color: var(--rsg-muted); padding: 7px 14px; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600; transition: color .15s, background .15s; }
.rsg-tab:hover { color: var(--rsg-text); }
.rsg-tab.is-active { background: var(--rsg-panel); color: var(--rsg-ink); box-shadow: 0 1px 3px rgba(16, 16, 20, .12); }
.rsg-tab-done { display: inline-flex; align-items: center; gap: 7px; margin-left: 8px !important; }
.rsg-tab-count { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #e7f7ec; color: #15803d; font-size: 12px; font-weight: 700; line-height: 1.5; text-align: center; }
.rsg-tab-count[hidden] { display: none; }
.rsg-tab.is-active .rsg-tab-count { background: #15803d; color: #fff; }
.rsg-select-toggle { min-height: 36px; padding: 7px 14px; }
.rsg-select-toggle.is-on { background: var(--rsg-ink); border-color: var(--rsg-ink); color: #fff; }
.rsg-select-toggle.is-on:hover { color: #fff; }
.rsg-bulk {
	position: sticky; top: 12px; z-index: 20;
	display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
	margin-bottom: 14px; padding: 10px 14px;
	background: var(--rsg-ink); color: #fff; border-radius: var(--rsg-radius); box-shadow: var(--rsg-shadow-hi);
}
.rsg-bulk[hidden] { display: none; }
.rsg-bulk .rsg-link { color: #d4d4d8; }
.rsg-bulk .rsg-link:hover { color: #fff; }
.rsg-bulk .rsg-field { color: #d4d4d8; }
.rsg-bulk .rsg-select { height: 36px; min-height: 36px; }
.rsg-bulk-sp { flex: 1; }
.rsg-list.is-selecting .rsg-card { cursor: pointer; }
.rsg-pick { display: flex; align-items: flex-start; padding-top: 4px; margin: 0; cursor: pointer; }
.rsg-pick input { width: 18px; height: 18px; margin: 0; accent-color: var(--rsg-accent); cursor: pointer; }
.rsg-card.is-selected { border-color: var(--rsg-accent); box-shadow: 0 0 0 2px var(--rsg-accent-soft); }
.rsg-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.rsg-search { width: 200px; }

/* List & cards */
.rsg-list { display: flex; flex-direction: column; gap: 12px; transition: opacity .15s; }
.rsg-list.is-loading { opacity: .5; pointer-events: none; }
.rsg-card {
	position: relative; display: flex; gap: 16px; padding: 16px 18px;
	background: var(--rsg-panel); border: 1px solid var(--rsg-border); border-radius: var(--rsg-radius);
	box-shadow: var(--rsg-shadow);
	transition: border-color .15s, box-shadow .15s, transform .15s;
}
.rsg-card:hover { border-color: var(--rsg-border-hi); box-shadow: var(--rsg-shadow-hi); }
.rsg-card.is-pinned { border-color: #f3c9c6; background: linear-gradient(90deg, var(--rsg-accent-soft), var(--rsg-panel) 35%); }
.rsg-card.is-pinned::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 4px; background: var(--rsg-accent); border-radius: var(--rsg-radius) 0 0 var(--rsg-radius); }
.rsg-card-main { flex: 1; min-width: 0; }
.rsg-card-title { font-size: 18px !important; font-weight: 700; line-height: 1.35; margin: 6px 0 4px !important; }
.rsg .rsg-card-title a { color: var(--rsg-ink); }
.rsg .rsg-card-title a:hover { color: var(--rsg-accent); text-decoration: none; }
.rsg-excerpt { color: var(--rsg-text-2); font-size: 14.5px; overflow-wrap: anywhere; }

/* Votes */
.rsg-vote {
	display: flex; flex-direction: column; align-items: center; gap: 2px; align-self: flex-start;
	width: 52px; flex: none; padding: 6px 0;
	background: var(--rsg-panel-2); border-radius: 9px;
}
.rsg-vbtn {
	display: flex; align-items: center; justify-content: center;
	width: 36px; height: 28px; padding: 0;
	background: transparent; color: #a1a1aa;
	border: 0; border-radius: 6px; cursor: pointer; font-size: 16px;
	transition: color .15s, background .15s;
}
.rsg-vbtn:hover:not(:disabled) { color: var(--rsg-ink); background: rgba(0, 0, 0, .06); }
.rsg-vup:hover:not(:disabled) { color: var(--rsg-accent); background: var(--rsg-accent-soft); }
.rsg-vdown:hover:not(:disabled) { color: var(--rsg-down); background: var(--rsg-down-soft); }
.rsg-vbtn:disabled { opacity: .35; cursor: not-allowed; }
.rsg-score { font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; padding: 1px 0; color: var(--rsg-ink); }
.rsg-vote.is-up { background: var(--rsg-accent-soft); }
.rsg-vote.is-up .rsg-vup { background: var(--rsg-accent); color: #fff; }
.rsg-vote.is-up .rsg-score { color: var(--rsg-accent); }
.rsg-vote.is-down { background: var(--rsg-down-soft); }
.rsg-vote.is-down .rsg-vdown { background: var(--rsg-down); color: #fff; }
.rsg-vote.is-down .rsg-score { color: var(--rsg-down); }

/* Badges & meta */
.rsg-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.rsg-badge {
	display: inline-block; padding: 2px 9px; border-radius: 999px;
	font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1.6;
	border: 0;
}
.rsg-st-open     { color: #52525b; background: #f1f1f3; }
.rsg-st-review   { color: #6d28d9; background: #f1ebfe; }
.rsg-st-planned  { color: #0e7490; background: #e3f6fa; }
.rsg-st-progress { color: #b45309; background: #fef3e2; }
.rsg-st-done     { color: #15803d; background: #e7f7ec; }
.rsg-st-declined { color: #b91c1c; background: #fdecec; }
.rsg-badge-pin    { color: #fff; background: var(--rsg-accent); }
.rsg-badge-server { color: #fff; background: var(--rsg-ink); }

.rsg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; color: var(--rsg-muted); font-size: 13px; }
.rsg-dot { opacity: .5; }
.rsg-author { display: inline-flex; align-items: center; gap: 7px; }
.rsg .rsg-av {
	width: 22px !important; height: 22px !important; min-width: 0 !important; min-height: 0 !important; max-width: none !important; max-height: none !important;
	aspect-ratio: 1 / 1; align-self: flex-start; flex: 0 0 auto;
	border-radius: 50%; object-fit: cover; background: var(--rsg-panel-2); border: 1px solid var(--rsg-border); margin: 0 !important; padding: 0 !important; box-shadow: none;
}
.rsg .rsg-av-lg { width: 38px !important; height: 38px !important; }
.rsg-av-link { display: inline-flex; flex: 0 0 auto; align-self: flex-start; border-radius: 50%; line-height: 0; }
.rsg-av-link:hover .rsg-av { border-color: var(--rsg-accent); }
.rsg .rsg-name { color: var(--rsg-ink); font-weight: 600; }
.rsg a.rsg-name:hover { color: var(--rsg-accent); text-decoration: none; }
.rsg-staff {
	margin-left: 2px; padding: 1px 7px; border-radius: 4px;
	background: var(--rsg-ink); color: #fff;
	font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; line-height: 1.6;
}
.rsg .rsg-ccount { display: inline-flex; align-items: center; gap: 5px; color: var(--rsg-muted); }
.rsg .rsg-ccount:hover { color: var(--rsg-ink); text-decoration: none; }
.rsg-replied { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--rsg-accent-soft); color: var(--rsg-accent); font-size: 12px; font-weight: 600; }

/* Pager / empty / toast */
.rsg-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 20px; }
.rsg-pager:empty { display: none; }
.rsg-pageinfo { color: var(--rsg-muted); font-size: 13px; }
.rsg-empty { padding: 40px 16px; text-align: center; color: var(--rsg-muted); background: var(--rsg-panel-2); border: 1px dashed var(--rsg-border-hi); border-radius: var(--rsg-radius); }
.rsg-empty-sm { padding: 20px; }
.rsg-toast {
	position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 99999;
	max-width: calc(100% - 32px); padding: 12px 18px;
	background: var(--rsg-ink); color: #fff; border-left: 4px solid var(--rsg-accent); border-radius: 8px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, .25); font-size: 14px;
}
.rsg-toast a { color: #ff8a84; }
.rsg-toast.is-error { border-left-color: #ff5a52; }
.rsg-toast[hidden] { display: none; }
.rsg-login-cta { margin-top: 14px; padding: 12px 14px; background: var(--rsg-panel-2); border-radius: 8px; color: var(--rsg-muted); font-size: 14px; }
.rsg-login-cta a { font-weight: 700; }

/* Detail */
.rsg-back {
	display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px !important;
	background: none; border: 0; padding: 4px 0; color: var(--rsg-muted); cursor: pointer; font-size: 14px; font-weight: 600;
}
.rsg-back:hover { color: var(--rsg-accent); }
.rsg-post {
	display: flex; gap: 18px; padding: 22px;
	background: var(--rsg-panel); border: 1px solid var(--rsg-border); border-radius: var(--rsg-radius);
	box-shadow: var(--rsg-shadow);
}
.rsg-post-main { flex: 1; min-width: 0; }
.rsg-post-title { font-size: 26px !important; font-weight: 800; line-height: 1.25; margin: 8px 0 2px !important; color: var(--rsg-ink); overflow-wrap: anywhere; }
.rsg-body { margin-top: 16px; overflow-wrap: anywhere; font-size: 15.5px; color: var(--rsg-text-2); }
.rsg-tally { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--rsg-border); color: var(--rsg-muted); font-size: 13px; }
.rsg-locked { margin-top: 10px; color: var(--rsg-muted); font-size: 13px; font-style: italic; }
.rsg-note {
	margin-top: 18px; padding: 14px 16px;
	background: var(--rsg-panel-2); border-left: 4px solid var(--rsg-ink); border-radius: 0 8px 8px 0;
}
.rsg-note-h { display: flex; align-items: center; gap: 8px; color: var(--rsg-ink); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.rsg-note-h::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rsg-accent); }
.rsg-note-b { overflow-wrap: anywhere; color: var(--rsg-text-2); }

.rsg-mod { margin-top: 14px; padding: 16px; background: #fafafa; border: 1px dashed var(--rsg-border-hi); border-radius: var(--rsg-radius); }
.rsg-mod-h { color: var(--rsg-ink); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 12px; }
.rsg-mod-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: 10px; }
.rsg-field { display: flex; align-items: center; gap: 8px; color: var(--rsg-text-2); font-size: 13px; font-weight: 600; margin: 0; }
.rsg-field.rsg-block { flex-direction: column; align-items: stretch; gap: 6px; }
.rsg-hint { font-weight: 400; color: var(--rsg-muted); }
.rsg-check { display: inline-flex; align-items: center; gap: 6px; color: var(--rsg-text); font-size: 14px; cursor: pointer; margin: 0; }
.rsg-check input { accent-color: var(--rsg-accent); width: 16px; height: 16px; margin: 0; }

.rsg-comments { margin-top: 28px; }
.rsg-sec-h { display: flex; align-items: center; gap: 8px; font-size: 20px !important; font-weight: 800; color: var(--rsg-ink); margin-bottom: 14px !important; }
.rsg-pill { display: inline-block; min-width: 26px; padding: 1px 9px; border-radius: 999px; background: var(--rsg-ink); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.rsg-clist { display: flex; flex-direction: column; gap: 10px; }
.rsg-comment { display: flex; gap: 12px; padding: 14px 16px; background: var(--rsg-panel); border: 1px solid var(--rsg-border); border-radius: var(--rsg-radius); }
.rsg-cmain { flex: 1; min-width: 0; }
.rsg-comment .rsg-meta { margin-top: 0; }
.rsg-cactions { margin-left: auto; display: inline-flex; gap: 12px; }
.rsg-post .rsg-meta .rsg-link { margin-left: 8px; }

/* Rich text & quotes */
.rsg-p { white-space: pre-wrap; overflow-wrap: anywhere; }
.rsg-p + .rsg-p, .rsg-quote + .rsg-p, .rsg-p + .rsg-quote, .rsg-quote + .rsg-quote { margin-top: 10px; }
.rsg .rsg-quote {
	margin: 0 !important; padding: 10px 14px !important;
	background: var(--rsg-panel-2) !important; border: 0 !important; border-left: 3px solid var(--rsg-border-hi) !important; border-radius: 0 8px 8px 0;
	color: var(--rsg-muted); font-size: 14px; font-style: normal; quotes: none;
}
.rsg .rsg-quote::before, .rsg .rsg-quote::after { content: none !important; display: none !important; }
.rsg .rsg-quote .rsg-quote { background: #ececee !important; margin-top: 8px !important; }
.rsg-quote-h { color: var(--rsg-ink); font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.rsg-quote-h::before { content: "\201C"; color: var(--rsg-accent); font-size: 18px; line-height: 0; margin-right: 4px; vertical-align: -4px; font-weight: 800; }
.rsg-cbody { margin-top: 4px; overflow-wrap: anywhere; color: var(--rsg-text-2); }
.rsg-cform { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }

/* Mobile */
@media (max-width: 640px) {
	.rsg { padding-top: 0; }
	.rsg-head { flex-direction: column; align-items: stretch; }
	.rsg-head .rsg-btn { width: 100%; }
	.rsg-h { font-size: 26px !important; }
	.rsg-compose-row { flex-direction: column; }
	.rsg-compose-row .rsg-select { width: 100%; }
	.rsg-toolbar { flex-direction: column; align-items: stretch; }
	.rsg-tabs { overflow-x: auto; }
	.rsg-tab { flex: 1; padding: 7px 8px; white-space: nowrap; }
	.rsg-filters .rsg-select { flex: 1; }
	.rsg-search { width: 100%; }
	.rsg-card, .rsg-post { gap: 12px; padding: 14px; }
	.rsg-vote { width: 44px; }
	.rsg-vbtn { width: 32px; }
	.rsg-post-title { font-size: 21px !important; }
}

/* Stop the browser's scroll anchoring from pulling the page down when a view swaps in. */
.rsg { overflow-anchor: none; }

/* Inline images & videos (v1.10) */
.rsg-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin: 10px 0; }
.rsg-media.is-single { grid-template-columns: minmax(0, 520px); }
.rsg-p + .rsg-media, .rsg-media + .rsg-p { margin-top: 10px; }
.rsg a.rsg-mimg { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--rsg-border); background: var(--rsg-panel-2); cursor: zoom-in; }
.rsg .rsg-mimg img { display: block; width: 100% !important; height: 150px !important; max-width: none !important; object-fit: cover; margin: 0 !important; transition: transform .25s; }
.rsg .rsg-media.is-single .rsg-mimg img { height: auto !important; max-height: 420px; object-fit: contain; }
.rsg-mimg:hover img { transform: scale(1.03); }
.rsg-mvid { display: block; width: 100%; max-height: 420px; border-radius: 8px; background: #000; grid-column: 1 / -1; }
.rsg-comment .rsg-media { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.rsg-comment .rsg-mimg img { height: 110px !important; }

html.rsg-lb-lock, html.rsg-lb-lock body { overflow: hidden !important; }
.rsg-lb { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 56px 72px 64px; background: rgba(8, 8, 10, .8); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; transition: opacity .18s; }
.rsg-lb[hidden] { display: none; }
.rsg-lb.is-open { opacity: 1; }
.rsg-lb-img { display: block; max-width: 100%; max-height: calc(100vh - 140px); border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.rsg-lb button { position: absolute; display: flex; align-items: center; justify-content: center; padding: 0; margin: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; line-height: 1; font-family: inherit; box-shadow: none; }
.rsg-lb button:hover { background: #e0322a; }
.rsg-lb button[hidden] { display: none; }
.rsg-lb-x { top: 14px; right: 14px; width: 44px; height: 44px; font-size: 30px; }
.rsg-lb-nav { top: 50%; width: 52px; height: 52px; margin-top: -26px !important; font-size: 36px; }
.rsg-lb-p { left: 12px; }
.rsg-lb-n { right: 12px; }
.rsg-lb-bar { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 18px; color: #d4d4d8; font-size: 13px; }
.rsg-lb-bar a { color: #e4e4e7; text-decoration: underline; }
@media (max-width: 640px) {
	.rsg-lb { padding: 56px 8px 60px; }
	.rsg-lb-nav { top: auto; bottom: 8px; margin-top: 0 !important; width: 44px; height: 44px; }
	.rsg-media { grid-template-columns: 1fr 1fr; }
}

/* Lightbox: keep images a comfortable size instead of filling the screen. */
.rsg-lb-img { width: auto !important; height: auto !important; max-width: min(960px, 85vw) !important; max-height: min(75vh, 680px) !important; object-fit: contain; }
@media (max-width: 640px) { .rsg-lb-img { max-width: 100% !important; max-height: 70vh !important; } }

/* Image uploads (v1.11) */
.rsg-up { display: flex; flex-direction: column; gap: 8px; }
.rsg-up-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rsg-up-btn { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.rsg-up-btn svg { width: 16px; height: 16px; }
.rsg-up-hint { color: var(--rsg-muted); font-size: 12px; }
.rsg-up-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.rsg-up-thumbs:empty { display: none; }
.rsg-up-th { position: relative; width: 110px; height: 76px; border-radius: 8px; overflow: hidden; background: var(--rsg-panel-2); border: 1px solid var(--rsg-border); }
.rsg .rsg-up-th img { width: 100% !important; height: 100% !important; object-fit: cover; margin: 0 !important; display: block; }
.rsg-up-th.is-up img { opacity: .5; }
.rsg-up-th.is-err img { opacity: .25; }
.rsg-up-prog { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .75); overflow: hidden; }
.rsg-up-prog i { display: block; height: 100%; background: var(--rsg-accent); transition: width .2s; }
.rsg-up-err { position: absolute; left: 4px; right: 4px; bottom: 4px; padding: 2px 5px; border-radius: 5px; background: #b91c1c; color: #fff; font-size: 10px; font-weight: 700; line-height: 1.3; }
.rsg-up-del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
.rsg-up-del:hover { background: var(--rsg-accent); }
form.is-drop { outline: 2px dashed var(--rsg-accent); outline-offset: 4px; }
