/* =====================================================================
   racunaj.me — Liga znanja
   ---------------------------------------------------------------------
   Theme-independent. Every colour reads a racunaj.me custom property with
   its own fallback, so the module looks right under that theme and still
   looks finished under any other one.
   ===================================================================== */

.rml-page {
	--rml-bg: var(--bg, #080b1a);
	--rml-text: var(--text, #eef1ff);
	--rml-soft: var(--text-soft, #b9c0e0);
	--rml-dim: var(--text-dim, #7d86ad);
	--rml-cyan: var(--cyan, #52e2fb);
	--rml-blue: var(--blue, #4d7cff);
	--rml-violet: var(--violet, #b46bff);
	--rml-gold: #ffc866;
	--rml-glass: var(--glass, rgba(255, 255, 255, 0.045));
	--rml-brd: var(--glass-brd, rgba(255, 255, 255, 0.1));
	--rml-grad: linear-gradient(120deg, var(--rml-cyan), var(--rml-blue) 52%, var(--rml-violet));
	--rml-radius: 20px;
	--rml-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--rml-gap: clamp(44px, 6.5vw, 84px);
}

.rml-main { color: var(--rml-text); }

.rml-container {
	width: min(100% - 40px, 1180px);
	margin-inline: auto;
}

.rml-container--narrow { width: min(100% - 40px, 620px); }

.rml-block { margin-bottom: var(--rml-gap); }
.rml-block:last-child { margin-bottom: var(--rml-gap); }

.rml-muted { color: var(--rml-dim); }

.rml-section__title {
	font-size: clamp(1.4rem, 2.4vw, 1.95rem);
	letter-spacing: -0.025em;
	margin: 0 0 clamp(20px, 3vw, 32px);
}

/* ---------- hero ---------- */
.rml-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-top: clamp(110px, 12vw, 158px);
	padding-bottom: clamp(36px, 5vw, 62px);
	margin-bottom: var(--rml-gap);
}

.rml-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(680px 320px at 12% 0%, rgba(77, 124, 255, 0.18), transparent 62%),
		radial-gradient(620px 340px at 90% 18%, rgba(180, 107, 255, 0.16), transparent 60%);
}

.rml-hero--auth,
.rml-hero--auth + * { text-align: center; }
.rml-hero--auth { text-align: center; }

.rml-trophy {
	display: block;
	font-size: clamp(2.4rem, 5vw, 3.4rem);
	line-height: 1;
	margin-bottom: 14px;
}

.rml-hero__title {
	font-size: clamp(1.9rem, 4vw, 3rem);
	line-height: 1.14;
	letter-spacing: -0.032em;
	margin: 0 0 14px;
}

.rml-hero__lead {
	font-size: clamp(1rem, 1.2vw, 1.14rem);
	line-height: 1.7;
	color: var(--rml-soft);
	margin: 0 auto;
	max-width: 60ch;
}

/* The auto margins centre the lead, which is right on the public page and
   wrong on a panel whose title is left-aligned. */
.rml-hero--panel .rml-hero__lead,
.rml-hero--profile .rml-hero__lead { margin-inline: 0; }

.rml-hero__note {
	margin: 16px auto 0;
	max-width: 60ch;
	font-size: 0.94rem;
	color: var(--rml-dim);
	line-height: 1.7;
}

/* ---------- the Liga znanja hero ------------------------------------
 * Scoped to --liga. The other heroes (login, profile, panel) keep the
 * stacked layout, which is right for a single short title.
 */
.rml-hero--liga {
	/* Was clamp(110px,12vw,158px) / clamp(36px,5vw,62px). The header is
	   ~75px and sticky, so the top value still leaves clear air under it. */
	padding-top: clamp(96px, 8vw, 118px);
	padding-bottom: clamp(26px, 3vw, 38px);
	/* Was var(--rml-gap), up to 84px. The statistics now start much sooner. */
	margin-bottom: clamp(26px, 3.4vw, 44px);
}

.rml-herorow {
	display: grid;
	/* The copy column is the wider of the two, but not by much — a 2:1 split
	   would leave the title stranded on its own in a sea of space. */
	grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
	gap: clamp(26px, 3.6vw, 54px);
	align-items: center;
}

.rml-herorow__brand {
	display: flex;
	align-items: center;
	gap: clamp(12px, 1.4vw, 20px);
	min-width: 0;
}

/* Inline with the title rather than stacked above it: that alone removed a
   whole line of height from the block. */
.rml-hero--liga .rml-trophy {
	margin-bottom: 0;
	font-size: clamp(2.2rem, 3.4vw, 3rem);
	line-height: 1;
	flex: none;
}

.rml-hero--liga .rml-hero__title {
	margin: 0;
	font-size: clamp(1.9rem, 3.6vw, 2.9rem);
	line-height: 1.08;
}

.rml-herorow__copy {
	min-width: 0;
	/* Keeps the copy from drifting to the far edge on a wide monitor while
	   still sitting clearly to the right of the title. */
	max-width: 52ch;
}

.rml-hero--liga .rml-hero__lead {
	margin: 0;
	max-width: none;
	text-align: left;
}

.rml-hero--liga .rml-hero__note {
	/* Was 16px above a centred block; the two lines now read as one unit. */
	margin: 10px 0 0;
	max-width: none;
	text-align: left;
}

/* One column below this: two columns of text at tablet width leave both of
   them too narrow to read comfortably. */
@media (max-width: 880px) {

	.rml-herorow {
		grid-template-columns: 1fr;
		gap: clamp(16px, 3vw, 24px);
		align-items: start;
	}

	.rml-hero--liga {
		padding-top: clamp(100px, 14vw, 128px);
		padding-bottom: clamp(24px, 4vw, 34px);
	}

	.rml-herorow__copy { max-width: 62ch; }
}

/* ---------- statistics ---------- */
.rml-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
}

.rml-stat {
	padding: 24px;
	border-radius: var(--rml-radius);
	background: var(--rml-glass);
	border: 1px solid var(--rml-brd);
	backdrop-filter: blur(16px) saturate(140%);
	-webkit-backdrop-filter: blur(16px) saturate(140%);
	text-align: center;
}

.rml-stat--alert { border-color: rgba(255, 200, 102, 0.4); }

.rml-stat__value {
	display: block;
	font-size: clamp(1.8rem, 3.2vw, 2.6rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.03em;
	background: var(--rml-grad);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	/* The gradient only paints inside its own box; descenders need the room. */
	padding-bottom: 0.08em;
}

.rml-stat__value--text { font-size: clamp(1.3rem, 2.2vw, 1.8rem); }

.rml-stat__label {
	display: block;
	margin-top: 6px;
	font-size: 0.86rem;
	color: var(--rml-dim);
}

/* ---------- filters ---------- */
.rml-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 14px;
	padding: 20px;
	border-radius: var(--rml-radius);
	background: var(--rml-glass);
	border: 1px solid var(--rml-brd);
}

.rml-field { margin-bottom: 16px; }
.rml-field--inline { margin-bottom: 0; flex: 1 1 180px; }

.rml-field label,
.rml-check span {
	display: block;
	font-size: 0.88rem;
	color: var(--rml-soft);
	margin-bottom: 7px;
}

.rml-field input,
.rml-field select,
.rml-field textarea {
	width: 100%;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid var(--rml-brd);
	background: rgba(255, 255, 255, 0.04);
	color: var(--rml-text);
	font: inherit;
	font-size: 0.98rem;
}

.rml-field select { appearance: none; }

.rml-field input:focus-visible,
.rml-field select:focus-visible,
.rml-field textarea:focus-visible,
.rml-btn:focus-visible,
.rml-choice__card:focus-visible,
.rml-avatarpick:focus-visible {
	outline: 2px solid var(--rml-cyan);
	outline-offset: 2px;
}

.rml-hint {
	margin: 6px 0 0;
	font-size: 0.82rem;
	color: var(--rml-dim);
}

.rml-check {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 18px;
	cursor: pointer;
}

.rml-check input { width: 18px; height: 18px; flex: none; }
.rml-check span { margin: 0; }

/* ---------- buttons ---------- */
.rml-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 22px;
	border-radius: 999px;
	border: 1px solid transparent;
	font: inherit;
	font-weight: 600;
	font-size: 0.96rem;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.3s var(--rml-ease), box-shadow 0.3s var(--rml-ease), border-color 0.3s var(--rml-ease);
}

.rml-btn--primary {
	background: var(--rml-grad);
	color: #fff;
	box-shadow: 0 14px 34px -18px rgba(77, 124, 255, 0.9);
}

.rml-btn--primary:hover { transform: translateY(-2px); }

.rml-btn--ghost {
	background: transparent;
	border-color: var(--rml-brd);
	color: var(--rml-text);
}

.rml-btn--ghost:hover { border-color: rgba(180, 107, 255, 0.5); }

.rml-btn--wide { width: 100%; }
.rml-btn--sm { padding: 9px 16px; font-size: 0.88rem; }

/* ---------- forms and auth ---------- */
.rml-form {
	text-align: left;
	padding: clamp(24px, 3.4vw, 36px);
	border-radius: var(--rml-radius);
	background: var(--rml-glass);
	border: 1px solid var(--rml-brd);
	margin-top: 26px;
}

.rml-form__title {
	font-size: 1.24rem;
	margin: 0 0 22px;
}

.rml-form__links {
	margin: 18px 0 0;
	font-size: 0.9rem;
	text-align: center;
	color: var(--rml-dim);
}

.rml-form__links a { color: var(--rml-cyan); }

.rml-note {
	margin: 16px 0 0;
	font-size: 0.86rem;
	line-height: 1.65;
	color: var(--rml-dim);
	text-align: center;
}

.rml-grid-2 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0 16px;
}

/* The two role cards on the login page. */
.rml-choice {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 18px;
	margin-top: 30px;
}

.rml-choice__card {
	display: block;
	padding: 30px 24px;
	border-radius: var(--rml-radius);
	background: var(--rml-glass);
	border: 1px solid var(--rml-brd);
	color: inherit;
	text-decoration: none;
	text-align: center;
	transition: transform 0.35s var(--rml-ease), border-color 0.35s var(--rml-ease);
}

.rml-choice__card:hover {
	transform: translateY(-4px);
	border-color: rgba(180, 107, 255, 0.44);
}

.rml-choice__icon { display: block; color: var(--rml-cyan); margin-bottom: 14px; }
.rml-choice__icon svg { width: 44px; height: 44px; }

.rml-choice__title { display: block; font-size: 1.16rem; font-weight: 700; margin-bottom: 8px; }
.rml-choice__text { display: block; font-size: 0.9rem; color: var(--rml-dim); line-height: 1.6; }

.rml-alert {
	margin: 22px 0 0;
	padding: 14px 18px;
	border-radius: 14px;
	font-size: 0.94rem;
	text-align: left;
	border: 1px solid var(--rml-brd);
}

.rml-alert--error { border-color: rgba(255, 130, 130, 0.45); background: rgba(255, 90, 90, 0.08); }
.rml-alert--ok { border-color: rgba(126, 240, 194, 0.42); background: rgba(126, 240, 194, 0.08); }

.rml-credential {
	margin-top: 24px;
	padding: 24px;
	border-radius: var(--rml-radius);
	background: var(--rml-glass);
	border: 1px solid var(--rml-brd);
	text-align: left;
}

.rml-credential__label { margin: 0 0 14px; font-weight: 700; }

.rml-credential__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 14px;
	margin: 0 0 10px;
	font-size: 0.94rem;
	color: var(--rml-soft);
}

.rml-credential__row code {
	font-size: 1.02rem;
	padding: 6px 12px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.06);
	color: var(--rml-cyan);
}

/* ---------- leaderboard ---------- */
.rml-columns {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 26px;
}

.rml-column__title {
	font-size: 1.16rem;
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--rml-brd);
}

.rml-board {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.rml-row {
	display: grid;
	grid-template-columns: 34px 44px minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-radius: 16px;
	background: var(--rml-glass);
	border: 1px solid var(--rml-brd);
}

.rml-row--medal { border-color: rgba(255, 200, 102, 0.32); }
.rml-row--m1 { box-shadow: inset 0 0 0 1px rgba(255, 200, 102, 0.3); }
.rml-row--m2 { box-shadow: inset 0 0 0 1px rgba(206, 214, 235, 0.26); }
.rml-row--m3 { box-shadow: inset 0 0 0 1px rgba(212, 145, 96, 0.26); }

.rml-row__pos {
	font-weight: 800;
	font-size: 1.02rem;
	color: var(--rml-dim);
	text-align: center;
}

.rml-row--m1 .rml-row__pos { color: var(--rml-gold); }
.rml-row--m2 .rml-row__pos { color: #ced6eb; }
.rml-row--m3 .rml-row__pos { color: #d49160; }

.rml-row__main { min-width: 0; }
.rml-row__name { display: block; font-weight: 600; }
.rml-row__class { display: block; font-size: 0.82rem; color: var(--rml-dim); }

.rml-row__rank { font-size: 0.84rem; color: var(--rml-soft); white-space: nowrap; }
.rml-row__points { font-weight: 700; white-space: nowrap; }
.rml-row__points small { font-weight: 400; color: var(--rml-dim); }

.rml-topclass {
	margin: 18px 0 0;
	padding: 14px 18px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--rml-brd);
	font-size: 0.92rem;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: baseline;
}

.rml-topclass__label { color: var(--rml-dim); }

/* ---------- avatars ---------- */
.rml-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	overflow: hidden;
}

.rml-avatar--generated svg { width: 100%; height: 100%; }

.rml-avatars {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 10px;
}

.rml-avatarpick {
	padding: 14px 12px;
	border-radius: 14px;
	border: 1px solid var(--rml-brd);
	background: var(--rml-glass);
	color: var(--rml-soft);
	font: inherit;
	font-size: 0.88rem;
	cursor: pointer;
	transition: border-color 0.25s, color 0.25s;
}

.rml-avatarpick:hover { color: var(--rml-text); border-color: rgba(180, 107, 255, 0.45); }
.rml-avatarpick.is-on { border-color: var(--rml-cyan); color: var(--rml-text); }

/* ---------- profile ---------- */
.rml-profilehead {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
}

.rml-profilehead__body { flex: 1 1 240px; min-width: 0; }
.rml-greeting { margin: 0 0 4px; color: var(--rml-dim); font-size: 0.94rem; }
.rml-profilehead__meta { margin: 8px 0 0; color: var(--rml-soft); font-size: 0.94rem; }

.rml-profilehead__score { text-align: right; }

.rml-score {
	display: block;
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.05;
	background: var(--rml-grad);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	padding-bottom: 0.08em;
}

.rml-score__label { display: block; font-size: 0.84rem; color: var(--rml-dim); }

.rml-rankcard {
	margin-top: 26px;
	padding: 20px 22px;
	border-radius: var(--rml-radius);
	background: var(--rml-glass);
	border: 1px solid var(--rml-brd);
}

.rml-rankcard__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 14px;
	font-size: 0.96rem;
}

.rml-rankcard__now { font-weight: 700; }
.rml-rankcard__next { color: var(--rml-dim); }

.rml-progress {
	height: 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.07);
	overflow: hidden;
}

.rml-progress__fill {
	display: block;
	height: 100%;
	width: var(--rml-pct, 0%);
	border-radius: inherit;
	background: var(--rml-grad);
	transition: width 1.1s var(--rml-ease);
}

.rml-positions {
	display: flex;
	flex-wrap: wrap;
	gap: 22px;
	margin: 20px 0 0;
	font-size: 0.94rem;
	color: var(--rml-soft);
}

/* ---------- activity list ---------- */
.rml-activity {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.rml-activity__item {
	display: grid;
	grid-template-columns: 60px minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	padding: 13px 16px;
	border-radius: 14px;
	background: var(--rml-glass);
	border: 1px solid var(--rml-brd);
}

/* A corrected entry stays visible; hiding it would make the history a lie. */
.rml-activity__item.is-reversed { opacity: 0.55; }
.rml-activity__item.is-reversed .rml-activity__points { text-decoration: line-through; }

.rml-activity__points {
	font-weight: 800;
	color: #7ef0c2;
	text-align: center;
}

.rml-activity__points.is-negative { color: #ff9c9c; }

.rml-activity__type { display: block; font-weight: 600; font-size: 0.96rem; }
.rml-activity__comment { display: block; font-size: 0.86rem; color: var(--rml-dim); margin-top: 3px; }

.rml-activity__flag {
	display: inline-block;
	margin-left: 8px;
	font-size: 0.74rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--rml-dim);
	font-style: normal;
}

.rml-activity__date { font-size: 0.82rem; color: var(--rml-dim); white-space: nowrap; }

/* ---------- teacher panel ---------- */
.rml-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.rml-list__item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 14px 18px;
	border-radius: 14px;
	background: var(--rml-glass);
	border: 1px solid var(--rml-brd);
}

.rml-list__main { display: flex; flex-direction: column; gap: 3px; }
.rml-list__actions { display: flex; gap: 8px; }

.rml-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 14px;
}

.rml-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px;
	border-radius: 16px;
	background: var(--rml-glass);
	border: 1px solid var(--rml-brd);
}

.rml-card__body { flex: 1; min-width: 0; }
.rml-card__name { margin: 0; font-size: 1rem; }
.rml-card__meta { margin: 3px 0 0; font-size: 0.82rem; color: var(--rml-dim); }
.rml-card__points { margin: 6px 0 0; font-weight: 700; font-size: 0.94rem; }
.rml-card__points small { font-weight: 400; color: var(--rml-dim); }

.rml-status { margin: 14px 0 0; font-size: 0.9rem; color: var(--rml-soft); min-height: 1.2em; }

/* ---------- empty state ---------- */
.rml-empty {
	padding: clamp(30px, 4vw, 48px);
	border-radius: var(--rml-radius);
	border: 1px dashed var(--rml-brd);
	background: rgba(255, 255, 255, 0.02);
	text-align: center;
	color: var(--rml-soft);
}

.rml-empty p { margin: 0 0 16px; }
.rml-empty p:last-child { margin-bottom: 0; }

/* ---------- modal ---------- */
.rml-modal {
	position: fixed;
	inset: 0;
	z-index: 9000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.rml-modal[hidden] { display: none; }

.rml-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(4, 6, 16, 0.72);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.rml-modal__panel {
	position: relative;
	width: min(100%, 520px);
	max-height: 90vh;
	overflow-y: auto;
	padding: clamp(22px, 3vw, 32px);
	border-radius: var(--rml-radius);
	background: #0d1130;
	border: 1px solid var(--rml-brd);
	box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.95);
}

.rml-modal__title { margin: 0 0 6px; font-size: 1.2rem; }
.rml-modal__who { margin: 0 0 20px; color: var(--rml-dim); font-size: 0.94rem; }
.rml-modal__actions { display: flex; gap: 10px; margin-top: 8px; }

/* ---------- rank celebration ---------- */
.rml-celebrate {
	position: fixed;
	inset: 0;
	z-index: 9500;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(4, 6, 16, 0.7);
	padding: 20px;
}

.rml-celebrate[hidden] { display: none; }

.rml-celebrate__card {
	text-align: center;
	padding: clamp(28px, 4vw, 44px);
	border-radius: var(--rml-radius);
	background: #0d1130;
	border: 1px solid rgba(255, 200, 102, 0.4);
	box-shadow: 0 0 60px -10px rgba(255, 200, 102, 0.35);
	animation: rml-pop 0.5s var(--rml-ease) both;
}

.rml-celebrate__icon {
	display: block;
	font-size: 3.2rem;
	line-height: 1;
	margin-bottom: 12px;
	animation: rml-pulse 2.4s ease-in-out infinite;
}

.rml-celebrate__card h2 { margin: 0 0 6px; }
.rml-celebrate__card p { margin: 0 0 20px; color: var(--rml-soft); }

@keyframes rml-pop {
	from { opacity: 0; transform: scale(0.9); }
	to { opacity: 1; transform: scale(1); }
}

@keyframes rml-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.07); }
}

/* ---------- responsive ---------- */
@media (max-width: 780px) {
	.rml-columns { grid-template-columns: 1fr; }

	.rml-row {
		grid-template-columns: 28px 40px minmax(0, 1fr) auto;
		gap: 10px;
	}

	/* The rank label would push the points off the row; the icon carries it. */
	.rml-row__rank-label { display: none; }

	.rml-profilehead__score { text-align: left; width: 100%; }

	.rml-activity__item { grid-template-columns: 52px minmax(0, 1fr); }
	.rml-activity__date { grid-column: 2; font-size: 0.78rem; }

	.rml-filters { flex-direction: column; align-items: stretch; }

	/* A full-height sheet is easier to use one-handed than a centred box. */
	.rml-modal { padding: 0; align-items: flex-end; }
	.rml-modal__panel {
		width: 100%;
		max-height: 92vh;
		border-radius: 22px 22px 0 0;
	}
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.rml-progress__fill { transition: none; }
	.rml-celebrate__card,
	.rml-celebrate__icon { animation: none; }
	.rml-btn--primary:hover,
	.rml-choice__card:hover { transform: none; }
}

/* ---------- quick activity chips ------------------------------------
 * Seven at most. The eighth control is "Više opcija", which is why the
 * row never wraps into an unreadable block whatever the admin configures.
 */
.rml-label {
	display: block;
	font-size: 0.88rem;
	color: var(--rml-soft);
	margin-bottom: 9px;
}

.rml-quick {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.rml-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 10px 14px;
	border-radius: 999px;
	border: 1px solid var(--rml-brd);
	background: var(--rml-glass);
	color: var(--rml-soft);
	font: inherit;
	font-size: 0.9rem;
	cursor: pointer;
	transition: border-color 0.25s, color 0.25s, transform 0.25s var(--rml-ease);
}

.rml-chip:hover { color: var(--rml-text); border-color: rgba(180, 107, 255, 0.5); }
.rml-chip.is-on { border-color: var(--rml-cyan); color: var(--rml-text); background: rgba(82, 226, 251, 0.1); }
.rml-chip small { color: var(--rml-dim); font-size: 0.78rem; }
.rml-chip--more { border-style: dashed; }

.rml-chosen {
	margin: 12px 0 0;
	font-size: 0.9rem;
	color: var(--rml-cyan);
	min-height: 1.2em;
}

/* ---------- the "more options" panel ---------- */
.rml-more {
	margin-top: 16px;
	padding: 18px;
	border-radius: 16px;
	border: 1px solid var(--rml-brd);
	background: rgba(255, 255, 255, 0.02);
}

.rml-more[hidden] { display: none; }

.rml-more__title {
	margin: 18px 0 10px;
	font-size: 0.82rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--rml-dim);
}

.rml-more__title:first-of-type { margin-top: 6px; }

.rml-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 4px;
}

.rml-cat {
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid var(--rml-brd);
	background: transparent;
	color: var(--rml-dim);
	font: inherit;
	font-size: 0.8rem;
	cursor: pointer;
}

.rml-cat:hover { color: var(--rml-text); }
.rml-cat.is-on { color: #fff; background: var(--rml-grad); border-color: transparent; }

/* Cards, not a dropdown: a sixty-item library has to be scannable. */
.rml-picklist {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 8px;
	max-height: 320px;
	overflow-y: auto;
}

.rml-pick {
	display: flex;
	align-items: stretch;
	border-radius: 12px;
	border: 1px solid var(--rml-brd);
	background: var(--rml-glass);
	overflow: hidden;
}

.rml-pick[hidden] { display: none; }

.rml-pick__main {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
	padding: 10px 12px;
	background: transparent;
	border: 0;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.rml-pick__main:hover { background: rgba(255, 255, 255, 0.04); }
.rml-pick__icon { flex: none; opacity: 0.7; }
.rml-pick__body { flex: 1; min-width: 0; }

.rml-pick__name {
	display: block;
	font-size: 0.92rem;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rml-pick__cat { display: block; font-size: 0.76rem; color: var(--rml-dim); }
.rml-pick__points { flex: none; font-weight: 700; font-size: 0.88rem; color: #7ef0c2; }

.rml-star {
	flex: none;
	width: 38px;
	border: 0;
	border-left: 1px solid var(--rml-brd);
	background: transparent;
	color: rgba(255, 255, 255, 0.2);
	font-size: 1rem;
	cursor: pointer;
	transition: color 0.25s;
}

.rml-star:hover { color: var(--rml-gold); }
.rml-star.is-on { color: var(--rml-gold); }

.rml-empty--inline {
	padding: 18px;
	margin-top: 10px;
	font-size: 0.9rem;
}

@media (max-width: 780px) {
	.rml-picklist { grid-template-columns: 1fr; max-height: 260px; }
}

/* The class header keeps the plain count on a phone; the breakdown would wrap
   to three lines and say less than the number it interrupts. */
@media (max-width: 560px) {
	.rml-hero__detail { display: none; }
}

/* ---------- reversal dialog -----------------------------------------
 * The panel is capped by the viewport, not by a fixed width, so a phone
 * shows the whole thing and the page behind it cannot scroll sideways.
 */
body.rml-modal-open { overflow: hidden; }

.rml-undo { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; }

.rml-undo__what { margin: 0 0 16px; color: var(--rml-soft, #c3c7e8); line-height: 1.65; }

.rml-undo__reasons { border: 0; margin: 0 0 14px; padding: 0; }
.rml-undo__reasons legend { padding: 0 0 8px; font-weight: 650; }

.rml-undo__reason {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	margin-bottom: 8px;
	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: 12px;
	cursor: pointer;
}
.rml-undo__reason:hover { border-color: rgba(155, 92, 255, 0.42); }

.rml-undo__other { margin-top: 4px; }
.rml-undo__other label { display: block; margin-bottom: 6px; font-size: 0.9rem; }
.rml-undo__other input {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 13px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	background: rgba(255, 255, 255, 0.05);
	color: inherit;
	font: inherit;
}

.rml-undo__err { margin: 8px 0 0; color: #ff9a9a; font-size: 0.88rem; }
.rml-undo__note { margin: 0 0 18px; font-size: 0.88rem; opacity: 0.75; }

@media (max-width: 560px) {
	.rml-modal__actions { flex-direction: column; align-items: stretch; }
	.rml-modal__actions .rml-btn { width: 100%; }
}
