/* =========================================================
   RoomLife app.css
   Clean full stylesheet
   Version: 2026-07-06
   ========================================================= */


/* =========================================================
   01. Design tokens
   ========================================================= */

:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #111827;
  --text-strong: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --line-soft: rgba(226, 232, 240, .72);
  --soft: rgba(15, 23, 42, .07);

  --blue: #2563eb;
  --blue-2: #1d4ed8;
  --blue-soft: #dbeafe;

  --red: #dc2626;
  --red-soft: #fee2e2;

  --green: #16a34a;
  --green-soft: #dcfce7;

  --orange: #f59e0b;
  --orange-soft: #fff7ed;

  --input: #eef2f7;

  --radius-sm: 12px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-2xl: 28px;

  --shadow-sm: 0 8px 18px rgba(15, 23, 42, .07);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, .07);
  --shadow-lg: 0 18px 44px rgba(15, 23, 42, .10);
  --shadow-xl: 0 28px 70px rgba(15, 23, 42, .18);

  --container: 1600px;
}


/* =========================================================
   02. Reset and base
   ========================================================= */

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
}

img {
  max-width: 100%;
}

h1,
h2,
h3 {
  color: var(--text-strong);
  letter-spacing: -0.03em;
}

h1 {
  font-weight: 760;
}

h2,
h3 {
  font-weight: 720;
}

p {
  margin-top: 0;
}


/* =========================================================
   03. Layout helpers
   ========================================================= */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 22px;
}

.page {
  padding-top: 28px;
  padding-bottom: 80px;
}

.mt-3 {
  margin-top: 16px;
}

.mt-4 {
  margin-top: 24px;
}

.p-0 {
  padding: 0 !important;
}

.full-span {
  grid-column: 1 / -1;
}

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

.small {
  max-width: 220px;
}


/* =========================================================
   04. Header and navigation
   ========================================================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px var(--soft);
}

.topbar-inner {
  height: 66px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  font-weight: 760;
}

.brand b {
  display: block;
  font-size: 18px;
  line-height: 22px;
  font-weight: 760;
}

.brand small {
  display: block;
  margin-top: -2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 13px;
  border-radius: 999px;
  color: #334155;
  font-weight: 650;
}

.nav a:hover {
  background: #ffffff;
  box-shadow: 0 10px 22px var(--soft);
}


/* =========================================================
   05. Common components
   ========================================================= */

.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-strong);
  font-weight: 650;
  line-height: 20px;
  transition: .15s ease;
}

.btn-primary,
.btn-primary:visited,
.btn-primary:hover,
.btn-primary:active,
.btn-primary *,
button.btn-primary,
a.btn-primary {
  color: #ffffff !important;
}

.btn-primary {
  background: var(--blue);
  border: 1px solid var(--blue);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .20);
}

.btn-primary:hover {
  background: var(--blue-2);
  border-color: var(--blue-2);
  transform: translateY(-1px);
}

.btn-outline {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--text-strong);
  box-shadow: 0 8px 20px var(--soft);
}

.btn-outline:hover {
  background: #f8fafc;
}

.input {
  width: 100%;
  min-height: 46px;
  border: 0;
  outline: 0;
  border-radius: var(--radius-md);
  background: var(--input);
  color: var(--text);
  padding: 12px 14px;
}

.input:focus {
  background: #f8fbff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .14);
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-strong);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.icon-btn.danger {
  background: var(--red-soft);
  color: var(--red);
}

.chip,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  line-height: 16px;
  font-weight: 760;
}

.badge-red {
  background: var(--red-soft);
  color: #991b1b;
}

.status-banner {
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 650;
}

.status-banner.blocked {
  background: var(--orange-soft);
  border: 1px solid #fed7aa;
  color: #9a3412;
}


/* =========================================================
   06. Flash messages and toasts
   ========================================================= */

.flash-wrap {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.flash {
  display: flex;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 16px;
  background: #e0f2fe;
  color: #075985;
  font-weight: 650;
}

.flash.error {
  background: var(--red-soft);
  color: #991b1b;
}

.flash.success {
  background: var(--green-soft);
  color: #166534;
}

.flash.warning {
  background: #fef3c7;
  color: #92400e;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 36px));
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--text-strong);
  color: #ffffff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .20);
  animation: toastIn .18s ease;
}

.toast.success {
  border-left: 4px solid #22c55e;
}

.toast.error {
  border-left: 4px solid #ef4444;
}

.toast.info {
  border-left: 4px solid #38bdf8;
}

.toast-out {
  opacity: 0;
  transform: translateX(20px);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}


/* =========================================================
   07. Hero and landing
   ========================================================= */

.hero {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 30px;
  align-items: center;
  padding: 54px;
}

.hero h1 {
  margin: 18px 0;
  font-size: 56px;
  line-height: 1.05;
  font-weight: 760;
  letter-spacing: -0.045em;
}

.hero p {
  max-width: 850px;
  color: #475569;
  font-size: 19px;
  line-height: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.metric,
.mini-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 10px 26px var(--soft);
}

.metric b {
  display: block;
  font-size: 36px;
  line-height: 42px;
  font-weight: 760;
}

.metric span,
.mini-card {
  color: var(--muted);
  font-weight: 650;
}

.mini-card {
  display: flex;
  align-items: center;
  gap: 10px;
}


/* =========================================================
   08. Auth
   ========================================================= */

.auth-card {
  max-width: 520px;
  margin: 50px auto;
  padding: 34px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 40px;
}

.form-stack {
  display: grid;
  gap: 16px;
}

.form-stack label {
  display: grid;
  gap: 8px;
  font-weight: 650;
}

.code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}


/* =========================================================
   09. Section head and tabs
   ========================================================= */

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
}

.section-head h1 {
  margin: 0;
  font-size: 32px;
  line-height: 40px;
}

.section-head p {
  margin: 6px 0 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
}

.tabs button,
.tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 650;
}

.tabs .active,
.tabs button.active {
  background: #ffffff;
  color: var(--text-strong);
  box-shadow: 0 8px 20px var(--soft);
}

.tabs a span {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .08);
  font-size: 12px;
}

.tabs a.active span {
  background: var(--blue-soft);
  color: var(--blue-2);
}

.big-tabs {
  padding: 12px;
}


/* =========================================================
   10. Search page
   ========================================================= */

.rl-search-hero {
  position: relative;
  overflow: visible;
  padding: 28px;
}

.rl-media-tabs {
  margin-top: 14px;
}

.rl-search-form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  overflow: visible;
}

.rl-search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  margin-top: 0;
  padding: 0 18px;
  border-radius: 22px;
  background: var(--input);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
}

.rl-search-box i {
  flex: 0 0 auto;
  color: var(--muted);
}

.rl-search-box .input {
  min-width: 0;
  min-height: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  font-size: 15px;
  line-height: 22px;
}

.rl-search-submit {
  min-height: 58px;
  padding: 0 28px;
  border-radius: 18px;
}

.rl-search-state {
  color: var(--blue);
  font-size: 14px;
  line-height: 20px;
  font-weight: 650;
  white-space: nowrap;
}

.rl-clear-search {
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  font-size: 18px;
}

.rl-clear-search.show {
  display: inline-flex;
}

.rl-clear-search:hover {
  color: #ef4444;
}

.rl-suggest-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 120;
  display: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-xl);
}

.rl-suggest-panel.open {
  display: block;
}

.rl-suggest-section {
  padding: 12px;
}

.rl-suggest-section + .rl-suggest-section {
  border-top: 1px solid #f1f5f9;
}

.rl-suggest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 8px;
}

.rl-suggest-head span {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 16px;
  font-weight: 760;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.rl-suggest-head button {
  border: 0;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.rl-suggest-head button:hover {
  color: #ef4444;
}

.rl-suggest-list {
  display: grid;
  gap: 4px;
}

.rl-suggest-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #334155;
  padding: 9px 10px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.rl-suggest-item:hover {
  background: #f8fafc;
}

.rl-suggest-item span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 560;
}

.rl-suggest-item span i {
  width: 18px;
  color: var(--muted-2);
  text-align: center;
}

.rl-suggest-remove {
  opacity: 0;
  color: var(--muted-2);
  padding: 7px;
  border-radius: 10px;
}

.rl-suggest-item:hover .rl-suggest-remove {
  opacity: 1;
}

.rl-suggest-remove:hover {
  background: var(--red-soft);
  color: #ef4444;
}

.rl-suggest-empty {
  padding: 10px 8px;
  color: var(--muted-2);
  font-size: 14px;
}

.rl-results-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.rl-results-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 32px;
  font-weight: 760;
}

.rl-empty-wide {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 36px;
  text-align: center;
}

.rl-empty-wide i {
  color: var(--muted-2);
  font-size: 28px;
}


/* =========================================================
   11. Media cards and grids
   ========================================================= */

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}

.rl-media-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.media-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .80);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 26px var(--soft);
}

.rl-media-card {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.poster,
.rl-poster {
  position: relative;
  overflow: hidden;
  background: var(--input);
  color: var(--muted-2);
}

.poster {
  height: 310px;
  display: grid;
  place-items: center;
}

.rl-poster {
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

.poster img,
.rl-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rl-poster img {
  display: block;
  transition: transform .22s ease;
}

.rl-media-card:hover .rl-poster img {
  transform: scale(1.035);
}

.rl-no-poster {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--input);
  color: var(--muted-2);
  font-size: 28px;
}

.rl-poster-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(-4px);
  transition: .18s ease;
}

.rl-media-card:hover .rl-poster-actions {
  opacity: 1;
  transform: translateY(0);
}

.rl-poster-actions button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
  color: var(--text-strong);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
  cursor: pointer;
}

.rl-poster-actions button:hover {
  background: var(--blue);
  color: #ffffff;
}

.media-card-body {
  flex: 1;
  display: grid;
  gap: 8px;
  padding: 16px;
}

.media-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 24px;
}

.media-card p {
  margin: 0;
  font-size: 14px;
}

.rl-media-title {
  margin-top: 10px;
  color: var(--text-strong);
  font-size: 16px;
  line-height: 21px;
  font-weight: 650;
}

.rl-media-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.rl-media-meta span {
  color: var(--orange);
  font-weight: 760;
}


/* =========================================================
   12. Skeletons
   ========================================================= */

.skeleton {
  background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7);
  background-size: 220% 100%;
  animation: rlSkeleton 1.1s linear infinite;
}

.skeleton-line {
  width: 55%;
  height: 14px;
  margin-top: 10px;
  border-radius: 999px;
  background: #e5e7eb;
}

.skeleton-line.wide {
  width: 82%;
}

@keyframes rlSkeleton {
  from {
    background-position: 0 0;
  }

  to {
    background-position: -220% 0;
  }
}


/* =========================================================
   13. Modals
   ========================================================= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, .55);
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  width: min(560px, 100%);
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  margin: 0;
  font-weight: 720;
}

.modal-body {
  padding: 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.check-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  font-weight: 650;
}

.rl-small-modal {
  max-width: 520px;
}

.rl-media-modal {
  position: relative;
  width: min(920px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .35);
}

.rl-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  color: var(--text-strong);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
}

.rl-modal-cover {
  position: relative;
  min-height: 360px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  background-position: center;
  background-size: cover;
}

.rl-modal-cover-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, .15), rgba(15, 23, 42, .88));
}

.rl-modal-cover-content {
  position: absolute;
  right: 28px;
  bottom: 24px;
  left: 28px;
  color: #ffffff;
}

.rl-modal-cover-content h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
  font-weight: 760;
  letter-spacing: -0.04em;
}

.rl-modal-meta {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.rl-modal-meta span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(10px);
  font-weight: 760;
}

.rl-modal-content {
  padding: 24px 28px 28px;
}

.rl-modal-content p {
  font-size: 16px;
  line-height: 26px;
}

.rl-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}


/* =========================================================
   14. Profile
   ========================================================= */

.profile-head {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 28px;
}

.rl-profile-hero {
  padding: 26px;
}

.avatar {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #eef2ff);
  box-shadow: var(--shadow-sm);
  font-size: 30px;
  font-weight: 760;
}

.avatar.small {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  font-size: 18px;
}

.profile-info {
  flex: 1;
}

.profile-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-title-row h1 {
  margin: 0;
  font-size: 34px;
  line-height: 42px;
  font-weight: 760;
  letter-spacing: -0.035em;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 6px 0 10px;
}

.profile-about {
  max-width: 820px;
  color: #475569;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.profile-stats span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 650;
}

.profile-stats b {
  color: var(--text-strong);
  font-size: 18px;
  font-weight: 760;
}


/* =========================================================
   15. Profile collections and list detail
   ========================================================= */

.compact-form {
  padding: 18px;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
}

.list-card {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.list-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.list-card h2 {
  margin: 0;
}

.mini-posters {
  display: flex;
  height: 92px;
}

.mini-poster {
  width: 64px;
  height: 92px;
  display: grid;
  place-items: center;
  margin-right: -14px;
  overflow: hidden;
  border: 3px solid #ffffff;
  border-radius: 14px;
  background: var(--input);
  color: var(--muted-2);
  box-shadow: var(--shadow-sm);
}

.mini-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rl-collection-sections {
  display: grid;
  gap: 24px;
}

.rl-collection-block {
  padding: 22px;
}

.rl-collection-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.rl-collection-head h2 {
  margin: 0;
  font-size: 25px;
  line-height: 32px;
  font-weight: 760;
}

.rl-collection-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rl-poster-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 14px;
}

.rl-strip-poster {
  min-width: 0;
  display: block;
}

.rl-strip-poster img,
.rl-strip-more {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .10);
}

.rl-strip-poster span {
  display: block;
  overflow: hidden;
  margin-top: 8px;
  color: var(--text-strong);
  font-size: 13px;
  line-height: 18px;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rl-strip-more {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  background: #f8fafc;
  color: var(--text-strong);
  text-align: center;
}

.rl-strip-more i {
  color: var(--muted);
  font-size: 24px;
}

.rl-strip-more b {
  font-size: 28px;
  line-height: 32px;
  font-weight: 760;
}

.rl-strip-more span {
  color: var(--muted);
  font-weight: 650;
}

.rl-list-head {
  align-items: center;
}

.rl-list-tools {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 14px;
  padding: 16px;
}

.rl-list-search {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 18px;
  background: var(--input);
}

.rl-list-search i {
  color: var(--muted);
}

.rl-list-search .input {
  min-height: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.rl-sort-select {
  min-height: 50px;
}


/* =========================================================
   16. Share
   ========================================================= */

.share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.share-link-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--input);
}

.share-link-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.share-link-box button {
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-weight: 760;
}


/* =========================================================
   17. Settings
   ========================================================= */

.settings-card {
  padding: 26px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.private-box {
  max-width: 620px;
  margin: 40px auto;
}

.switch-line {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
}

.switch-line input {
  display: none;
}

.switch-line i {
  position: relative;
  flex: 0 0 54px;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: .15s;
}

.switch-line i::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .18);
  transition: .15s;
}

.switch-line input:checked + i {
  background: var(--blue);
}

.switch-line input:checked + i::before {
  transform: translateX(24px);
}

.chips-select {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
}

.chips-select input {
  display: none;
}

.chips-select span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border-radius: 999px;
  background: #f1f5f9;
  cursor: pointer;
  font-weight: 650;
}

.chips-select input:checked + span {
  background: var(--blue-soft);
  color: var(--blue-2);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .14);
}

.rl-settings-page {
  display: grid;
  gap: 24px;
}

.rl-settings-card {
  padding: 26px;
}

.rl-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.rl-settings-form {
  display: grid;
  gap: 16px;
}

.rl-field {
  display: grid;
  gap: 8px;
}

.rl-field span {
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  font-weight: 650;
}

.rl-field small {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.rl-field textarea {
  min-height: 120px;
  resize: vertical;
}

.rl-settings-side {
  display: grid;
  gap: 14px;
}

.rl-settings-side h2,
.rl-interests-card h2,
.rl-my-lists-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 28px;
}

.rl-privacy-list {
  display: grid;
  gap: 10px;
}

.rl-switch-line {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
}

.rl-switch-line span {
  color: #334155;
  font-weight: 560;
}

.rl-switch-line input {
  display: none;
}

.rl-switch-line i {
  position: relative;
  flex: 0 0 54px;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: .16s ease;
}

.rl-switch-line i::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .18);
  transition: .16s ease;
}

.rl-switch-line input:checked + i {
  background: var(--blue);
}

.rl-switch-line input:checked + i::before {
  transform: translateX(24px);
}

.rl-interests-card,
.rl-my-lists-card {
  padding: 26px;
}

.rl-interest-section {
  padding-top: 18px;
}

.rl-interest-section + .rl-interest-section {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.rl-interest-section h3 {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 24px;
}

.rl-interest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rl-interest-chips label {
  display: inline-flex;
}

.rl-interest-chips input {
  display: none;
}

.rl-interest-chips span {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
  font-size: 14px;
  font-weight: 560;
}

.rl-interest-chips input:checked + span {
  background: var(--blue-soft);
  color: var(--blue-2);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .14);
}

.rl-list-manager {
  display: grid;
  gap: 18px;
}

.rl-list-manager-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f8fafc;
}

.rl-list-manager-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.rl-list-manager-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
}

.rl-list-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.rl-list-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.rl-list-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-weight: 560;
}


/* =========================================================
   18. People pages
   ========================================================= */

.people-list {
  display: grid;
  gap: 10px;
}

.person-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
}

.person-row small {
  display: block;
  color: var(--muted);
}


/* =========================================================
   19. Empty states and utilities
   ========================================================= */

.empty {
  padding: 36px;
  color: var(--muted);
  text-align: center;
}

.danger-text {
  color: var(--red) !important;
}


/* =========================================================
   20. Responsive
   ========================================================= */

@media (max-width: 1180px) {
  .rl-media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rl-poster-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .settings-grid,
  .rl-settings-grid {
    grid-template-columns: 1fr;
  }

  .rl-search-form {
    grid-template-columns: 1fr;
  }

  .rl-search-submit {
    width: 100%;
  }

  .rl-search-state {
    min-height: 20px;
  }

  .rl-suggest-panel {
    position: static;
    margin-top: 10px;
  }

  .nav a {
    padding: 9px;
  }

  .nav a:not(.btn) {
    font-size: 0;
  }

  .nav a i {
    font-size: 16px;
  }
}

@media (max-width: 760px) {
  .profile-head {
    align-items: flex-start;
  }

  .inline-form,
  .rl-list-create-row {
    grid-template-columns: 1fr;
  }

  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .poster {
    height: 240px;
  }

  .rl-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .rl-list-tools {
    grid-template-columns: 1fr;
  }

  .rl-poster-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rl-collection-head {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .section-head {
    flex-direction: column;
  }

  .share-grid {
    grid-template-columns: 1fr;
  }

  .share-link-box {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-title-row h1 {
    font-size: 28px;
    line-height: 34px;
  }

  .rl-settings-card,
  .rl-interests-card,
  .rl-my-lists-card {
    padding: 20px;
  }
}

@media (max-width: 460px) {
  .container {
    padding: 0 14px;
  }

  .rl-media-grid {
    grid-template-columns: 1fr;
  }

  .rl-poster-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-inner {
    height: auto;
    min-height: 66px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .brand {
    min-width: 0;
  }
}

/* =========================================================
   Modal title color fix
   Заголовок фильма в попапе должен быть белым поверх постера
   ========================================================= */

.rl-modal-cover-content {
  z-index: 2;
  color: #ffffff;
}

.rl-modal-cover-content h1,
.rl-modal-cover-content h2,
.rl-modal-cover-content h3,
.rl-modal-cover-content p,
.rl-modal-cover-content span {
  color: #ffffff !important;
}

.rl-modal-cover-content h2,
.rl-modal-cover-content #info-title {
  color: #ffffff !important;
  text-shadow: 0 3px 18px rgba(0, 0, 0, .55);
}

.rl-modal-meta span {
  color: #ffffff !important;
  background: rgba(15, 23, 42, .45);
  border: 1px solid rgba(255, 255, 255, .18);
}

.rl-modal-cover-fade {
  z-index: 1;
  pointer-events: none;
}

.rl-modal-cover-content {
  position: absolute;
  right: 28px;
  bottom: 24px;
  left: 28px;
}

/* =========================================================
   Header primary button fix
   Кнопка "Регистрация" в шапке не должна белеть и прыгать
   ========================================================= */

.topbar .nav a.btn-primary,
.topbar .nav a.btn-primary:visited,
.topbar .nav a.btn-primary:hover,
.topbar .nav a.btn-primary:focus,
.topbar .nav a.btn-primary:active {
  background: var(--blue) !important;
  border-color: var(--blue) !important;
  color: #ffffff !important;
  transform: none !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .20) !important;
}

.topbar .nav a.btn-primary:hover,
.topbar .nav a.btn-primary:focus {
  background: var(--blue-2) !important;
  border-color: var(--blue-2) !important;
  color: #ffffff !important;
}

.topbar .nav a.btn-primary *,
.topbar .nav a.btn-primary:hover * {
  color: #ffffff !important;
}