:root{--bg:#f6f7fb;--card:#fff;--text:#0f172a;--muted:#64748b;--line:#e2e8f0;--soft:rgba(15,23,42,.07);--blue:#2563eb;--blue2:#1d4ed8;--red:#dc2626;--green:#16a34a;--input:#eef2f7}
*{box-sizing:border-box}html,body{height:100%}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,Arial,sans-serif;line-height:1.5}a{text-decoration:none;color:inherit}button,input,textarea,select{font:inherit}.container{max-width:1600px;margin:0 auto;padding:0 22px}.page{padding-top:28px;padding-bottom:80px}.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,.avatar{display:grid;place-items:center;width:44px;height:44px;border-radius:16px;background:#fff;box-shadow:0 10px 24px var(--soft);font-weight:900}.brand b{display:block;font-size:18px}.brand small{display:block;color:var(--muted);font-size:12px;margin-top:-2px}.nav{margin-left:auto;display:flex;align-items:center;gap:8px}.nav a{display:inline-flex;align-items:center;gap:8px;padding:10px 13px;border-radius:999px;font-weight:800;color:#334155}.nav a:hover{background:#fff;box-shadow:0 10px 22px var(--soft)}.card{background:var(--card);border-radius:22px;box-shadow:0 10px 30px var(--soft);border:1px solid rgba(226,232,240,.7)}.mt-3{margin-top:16px}.mt-4{margin-top:24px}.p-0{padding:0!important}.muted{color:var(--muted)}.btn{border:0;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 16px;border-radius:14px;font-weight:850;cursor:pointer;transition:.15s}.btn-primary{background:var(--blue);color:#fff;box-shadow:0 8px 20px rgba(37,99,235,.2)}.btn-primary:hover{background:var(--blue2);transform:translateY(-1px)}.btn-outline{background:#fff;color:#0f172a;border:1px solid var(--line);box-shadow:0 8px 20px var(--soft)}.btn-outline:hover{background:#f8fafc}.input{width:100%;border:0;background:var(--input);border-radius:14px;padding:12px 14px;outline:none}.input:focus{box-shadow:0 0 0 4px rgba(37,99,235,.14);background:#f8fbff}.small{max-width:220px}.flash-wrap{display:grid;gap:10px;margin-bottom:18px}.flash{padding:13px 16px;border-radius:16px;background:#e0f2fe;color:#075985;font-weight:700;display:flex;gap:10px}.flash.error{background:#fee2e2;color:#991b1b}.flash.success{background:#dcfce7;color:#166534}.flash.warning{background:#fef3c7;color:#92400e}.chip,.badge{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:12px;font-weight:900}.badge-red{background:#fee2e2;color:#991b1b}.status-banner{padding:14px 18px;border-radius:16px;font-weight:800}.status-banner.blocked{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}.hero{padding:54px;display:grid;grid-template-columns:1.3fr .7fr;gap:30px;align-items:center}.hero h1{font-size:56px;line-height:1.05;margin:18px 0 18px;letter-spacing:-1.5px}.hero p{font-size:19px;color:#475569;max-width:850px}.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:26px}.hero-panel{display:grid;grid-template-columns:1fr 1fr;gap:14px}.metric,.mini-card{background:#fff;border-radius:20px;padding:22px;box-shadow:0 10px 26px var(--soft)}.metric b{display:block;font-size:36px}.metric span,.mini-card{color:#64748b;font-weight:800}.mini-card{display:flex;align-items:center;gap:10px}.auth-card{max-width:520px;margin:50px auto;padding:34px}.auth-card h1{font-size:34px;margin:0 0 8px}.form-stack{display:grid;gap:16px}.form-stack label{display:grid;gap:8px;font-weight:800}.code-row{display:grid;grid-template-columns:1fr auto;gap:10px}.section-head{padding:24px;display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.section-head h1{margin:0;font-size:32px}.section-head p{margin:6px 0 0}.tabs{display:flex;gap:8px;flex-wrap:wrap;padding:6px}.tabs button,.tabs a{border:0;background:#f1f5f9;color:#334155;border-radius:999px;padding:11px 16px;font-weight:900;display:inline-flex;gap:8px;align-items:center;cursor:pointer}.tabs .active,.tabs button.active{background:#fff;color:#0f172a;box-shadow:0 8px 20px var(--soft)}.big-tabs{padding:12px}.search-shell{padding:22px}.search-box{display:flex;align-items:center;gap:10px;background:var(--input);border-radius:18px;padding:0 14px;margin-top:12px}.search-box .input{background:transparent;box-shadow:none}.suggestions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.suggestions .sug{border:0;border-radius:999px;background:#fff;padding:8px 12px;box-shadow:0 6px 16px var(--soft);font-weight:800}.suggestions .sug .x{margin-left:8px;color:#94a3b8}.media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:22px}.media-card{background:#fff;border-radius:20px;overflow:hidden;box-shadow:0 10px 26px var(--soft);border:1px solid rgba(226,232,240,.8);display:flex;flex-direction:column}.poster{height:310px;background:#eef2f7;display:grid;place-items:center;color:#94a3b8}.poster img{width:100%;height:100%;object-fit:cover}.media-card-body{padding:16px;display:grid;gap:8px;flex:1}.media-card h3{margin:0;font-size:17px}.media-card p{margin:0;font-size:14px}.modal-backdrop{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(15,23,42,.55);z-index:100;padding:18px}.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-body{padding:18px}.icon-btn{border:0;background:#fff;border-radius:12px;width:40px;height:40px;display:inline-grid;place-items:center;box-shadow:0 8px 18px var(--soft);cursor:pointer}.icon-btn.danger{color:var(--red);background:#fee2e2}.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:800}.modal-actions{display:flex;justify-content:flex-end}.profile-head{padding:28px;display:flex;gap:22px;align-items:center}.avatar{width:76px;height:76px;border-radius:24px;font-size:30px;background:linear-gradient(135deg,#fff,#eef2ff)}.avatar.small{width:44px;height:44px;border-radius:16px;font-size:18px}.profile-info{flex:1}.profile-title-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.profile-title-row h1{margin:0;font-size:36px}.profile-meta{display:flex;gap:14px;flex-wrap:wrap;margin:6px 0 10px}.profile-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.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{padding:20px;display:grid;gap:14px}.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;margin-right:-14px;border:3px solid #fff;border-radius:14px;overflow:hidden;background:#eef2f7;display:grid;place-items:center;color:#94a3b8;box-shadow:0 8px 18px var(--soft)}.mini-poster img{width:100%;height:100%;object-fit:cover}.empty{padding:36px;text-align:center;color:#64748b}.private-box{max-width:620px;margin:40px auto}.settings-card{padding:26px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}.full-span{grid-column:1/-1}.switch-line{display:flex!important;align-items:center;justify-content:space-between;gap:14px;padding:14px;background:#f8fafc;border-radius:16px}.switch-line input{display:none}.switch-line i{position:relative;width:54px;height:30px;background:#cbd5e1;border-radius:999px;transition:.15s;flex:0 0 54px}.switch-line i:before{content:'';position:absolute;width:24px;height:24px;left:3px;top:3px;border-radius:50%;background:#fff;transition:.15s;box-shadow:0 3px 8px rgba(0,0,0,.18)}.switch-line input:checked+i{background:var(--blue)}.switch-line input:checked+i:before{transform:translateX(24px)}.chips-select{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:18px}.chips-select input{display:none}.chips-select span{display:inline-flex;gap:7px;align-items:center;border-radius:999px;background:#f1f5f9;padding:9px 13px;font-weight:850;cursor:pointer}.chips-select input:checked+span{background:#dbeafe;color:#1d4ed8;box-shadow:0 0 0 2px rgba(37,99,235,.14)}.people-list{display:grid;gap:10px}.person-row{display:flex;gap:12px;align-items:center;padding:14px;border-radius:16px;background:#f8fafc}.person-row small{display:block;color:#64748b}.toast-stack{position:fixed;right:18px;bottom:18px;z-index:200;display:grid;gap:10px;max-width:420px}.toast{background:#0f172a;color:#fff;padding:14px 16px;border-radius:16px;box-shadow:0 16px 40px rgba(0,0,0,.2);display:flex;gap:10px;align-items:center;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)}.danger-text{color:#dc2626!important}@keyframes toastIn{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:none}}@media(max-width:900px){.hero{grid-template-columns:1fr;padding:28px}.hero h1{font-size:38px}.profile-head{align-items:flex-start}.settings-grid{grid-template-columns:1fr}.nav a{padding:9px}.nav a:not(.btn){font-size:0}.nav a i{font-size:16px}.inline-form{grid-template-columns:1fr}.media-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}.poster{height:240px}}
/* ===== RoomLife polish patch v2 ===== */

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
  font-weight: 400;
  letter-spacing: -0.01em;
}

h1, h2, h3 {
  font-weight: 750;
}

.brand b {
  font-weight: 750;
}

.nav a,
.btn,
.tabs a,
.tabs button,
.badge,
.chip {
  font-weight: 700 !important;
}

.hero h1 {
  font-weight: 750 !important;
  letter-spacing: -0.045em;
}

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

.btn-primary {
  background: #2563eb !important;
  border: 1px solid #2563eb !important;
}

.btn-primary:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
}

.profile-head {
  align-items: flex-start;
}

.profile-title-row h1 {
  font-size: 34px;
  font-weight: 750 !important;
  letter-spacing: -0.035em;
}

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

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

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

.profile-stats b {
  color: #0f172a;
  font-size: 18px;
}

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

.tabs a.active span {
  background: #dbeafe;
  color: #1d4ed8;
}

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

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

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

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

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

@media (max-width: 640px) {
  .share-grid {
    grid-template-columns: 1fr;
  }

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

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

/* ===== RoomLife UI v4: search, profile collections, list detail ===== */

.rl-search-hero {
  padding: 24px;
}

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

.rl-search-box i {
  color: #64748b;
}

.rl-search-box .input {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  font-size: 16px;
}

.rl-search-state {
  color: #2563eb;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.rl-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.sug-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sug-group > span {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

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

.rl-results-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

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

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

.rl-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .10);
}

.rl-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  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: #eef2f7;
  color: #94a3b8;
  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: #0f172a;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
  cursor: pointer;
}

.rl-poster-actions button:hover {
  background: #2563eb;
  color: #ffffff;
}

.rl-media-title {
  margin-top: 10px;
  color: #0f172a;
  font-size: 16px;
  line-height: 21px;
  font-weight: 750;
}

.rl-media-meta {
  margin-top: 3px;
  color: #64748b;
  font-size: 14px;
  line-height: 20px;
}

.rl-media-meta span {
  color: #f59e0b;
  font-weight: 800;
}

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

.skeleton-line {
  height: 14px;
  width: 55%;
  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; }
}

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

.rl-empty-wide i {
  font-size: 28px;
  color: #94a3b8;
}

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

.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: 800;
  letter-spacing: -0.03em;
}

.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;
  margin-top: 8px;
  color: #0f172a;
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.rl-strip-more i {
  font-size: 24px;
  color: #64748b;
}

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

.rl-strip-more span {
  color: #64748b;
  font-weight: 700;
}

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

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

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

.rl-list-search i {
  color: #64748b;
}

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

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

.rl-media-modal {
  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);
  position: relative;
}

.rl-modal-close {
  position: absolute;
  z-index: 4;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  color: #0f172a;
  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;
  left: 28px;
  right: 28px;
  bottom: 24px;
  color: #ffffff;
}

.rl-modal-cover-content h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
  font-weight: 850;
  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;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
  font-weight: 800;
}

.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;
}

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

@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: 760px) {
  .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: 460px) {
  .rl-media-grid {
    grid-template-columns: 1fr;
  }

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