/* Rjeti.com v1.8.6 — modern social theme inspired by the approved preview.
 * Presentation-only overrides: posting, stories, privacy, calls and routing are unchanged.
 */
:root{
  --r186-accent:#ee1833;--r186-accent-deep:#ce0e27;
  --r186-radius:16px;--r186-radius-small:11px;
  --r186-shadow:0 5px 20px rgba(35,48,75,.045);
  --r186-shadow-hover:0 9px 25px rgba(40,49,77,.09);
  --r186-surface:#fff;--r186-light:#f5f7fa;
}
body{--red:var(--r186-accent);--red2:var(--r186-accent-deep);--radius:var(--r186-radius);--shadow:var(--r186-shadow);background:#f1f4f8;letter-spacing:-.005em}
body[data-theme="dark"]{--r186-light:#253142;--r186-surface:#1d2735;background:var(--bg)}
@media(prefers-color-scheme:dark){body[data-theme="system"]{--r186-light:#253142;--r186-surface:#1d2735;background:var(--bg)}}
.card{border:1px solid var(--line);border-radius:var(--r186-radius);box-shadow:var(--r186-shadow)}
.card:hover{box-shadow:var(--r186-shadow-hover)}
:where(.btn,.nav-link,.top-links a,.post-options summary,.action-button,.story-tile,.widget a,.r167-prompt){transition:background-color .18s,color .18s,border-color .18s,box-shadow .18s,transform .18s}
:where(a,button,input,select,textarea):focus-visible{outline:3px solid color-mix(in srgb,var(--red) 55%,transparent);outline-offset:2px}
/* Streamlined platform header: stays minimal, as in the existing preferred navigation. */
.topbar{height:70px;background:var(--surface);box-shadow:0 2px 11px rgba(24,33,50,.035);border-color:var(--line)}
.top-inner{max-width:1820px;padding-inline:22px;gap:24px}
.brand{min-width:240px;font-size:27px;gap:9px;letter-spacing:-1.2px;color:var(--ink)}
.brand-mark{height:42px;width:42px;border-radius:12px;background:linear-gradient(145deg,#ff304c,#d80e29);box-shadow:0 5px 15px rgba(237,27,47,.16)}
.top-search{max-width:500px;min-width:130px;background:var(--r169-field);border:1px solid var(--line);padding:10px 16px;min-height:44px;border-radius:999px}
.top-search input{font-size:13px}
.top-links{gap:9px}
.top-links>a:not(.top-self){height:62px;min-width:60px;padding:8px 12px;border-radius:12px 12px 0 0;gap:2px}
.top-links>a:not(.top-self):hover{background:var(--red-soft)}
.top-links>a.active{color:var(--red)}
.top-links>a.active:after{height:3px;left:12px;right:12px}
.top-links .top-self{margin-left:8px}
.top-links .top-self .avatar{width:38px;height:38px;border:2px solid var(--surface);box-shadow:0 0 0 1px var(--line)}
.bubble{top:6px;right:7px;box-shadow:0 0 0 2px var(--surface);font-size:10px;font-weight:800}
/* Desktop shell. Boxed max-width remains administered by the existing setting. */
.app-layout{max-width:1800px;grid-template-columns:244px minmax(0,1fr)}
.sidebar{top:70px;height:calc(100dvh - 70px);padding:22px 12px 22px 16px;background:var(--surface);border-right:1px solid var(--line)}
.sidebar-profile{padding:9px 10px 17px;margin-bottom:6px;gap:12px;border-bottom:1px solid var(--line)}
.sidebar-profile .avatar{box-shadow:0 0 0 3px var(--red-soft)}
.sidebar-profile strong{font-size:13px;font-weight:800;line-height:1.3;color:var(--ink)}
.sidebar-profile small{font-size:11px;color:var(--muted)}
.side-nav{gap:3px}
.r186-nav-caption{display:block;margin:15px 12px 9px;color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.09em;text-transform:uppercase}
.side-nav .nav-link{display:flex;align-items:center;min-height:43px;border-radius:11px;padding:6px 10px;gap:11px;color:var(--ink);font-size:13px;font-weight:600}
.side-nav .nav-label{line-height:1.3}
.side-nav .nav-icon{background:transparent!important;border:0!important;width:27px;height:27px;display:grid;place-items:center;color:#53627b}
.side-nav .nav-link:hover{background:var(--r169-hover);color:var(--red)}
.side-nav .nav-link.selected{color:var(--red);background:var(--red-soft);font-weight:800}
.side-nav .nav-link.selected .nav-icon{background:transparent!important;color:var(--red)!important}
.pill-count{background:var(--red);border-radius:999px;color:#fff;min-width:20px;line-height:20px;text-align:center;font-size:11px;margin-left:auto}
.sidebar-footer{font-size:10px;line-height:1.6;opacity:.7}
.main-area{min-width:0}
.content-area{grid-template-columns:minmax(0,1fr) 295px;gap:18px;padding:19px 21px 56px;max-width:1445px}
.page-main{min-width:0}
.content-area.content-wide{grid-template-columns:minmax(0,1fr)}
.right-sidebar{gap:14px;min-width:0}
body[data-layout="boxed"] .topbar,body[data-layout="boxed"] .app-layout{max-width:1360px}
body[data-layout="boxed"] .app-layout{grid-template-columns:216px minmax(0,1fr)}
body[data-layout="boxed"] .content-area:not(.content-wide){grid-template-columns:minmax(0,1fr) 260px;gap:15px;padding:19px 16px 56px}
body[data-layout="boxed"] .brand{min-width:185px}
/* Stories become a visually inviting horizontal gallery with real member photos. */
.stories-box{padding:15px;margin-bottom:16px;overflow:hidden}
.stories-box>.widget-title{margin-bottom:12px}
.widget-title h2{font-size:16px;font-weight:800;letter-spacing:-.025em}
.widget-title a{font-size:11px;font-weight:700;color:var(--red)}
.stories-row{gap:9px;padding:2px 2px 7px;scrollbar-width:thin}
.stories-row .r163-group-wrap{flex:0 0 106px;min-width:0}
.stories-row .r163-story-card{width:100%;min-height:168px;height:168px;border-radius:13px;overflow:hidden;display:block;position:relative;border:0;box-shadow:none}
.stories-row .r163-story-card img.r17-story-cover{width:100%;height:100%;object-fit:cover;display:block;transition:transform .25s ease}
.stories-row .r163-story-card:hover img.r17-story-cover{transform:scale(1.05)}
.stories-row .r163-story-card.r163-unseen{outline:2px solid var(--red);outline-offset:-2px}
.stories-row .r163-story-card.r163-seen{opacity:.82}
.stories-row .r163-story-card .r163-story-user{z-index:2}
.stories-row .story-add{flex:0 0 106px;width:106px;height:168px;border-radius:13px;background:var(--r169-soft);border:1px dashed var(--line);color:var(--ink);justify-content:center;align-items:center;gap:8px}
.stories-row .story-add .avatar{width:47px;height:47px}
.stories-row .story-add small{font-size:11px;font-weight:700;color:var(--ink)}
.stories-row .plus-circle{background:var(--red);color:white}
/* The compact composer opens the original fully working modal. */
.r167-composer{padding:14px 16px 12px;margin-bottom:17px;border-radius:17px}
.r167-compact{gap:11px}
.r167-prompt-row{display:flex;gap:12px;align-items:center}
.r167-prompt-row .avatar{width:43px;height:43px;flex:0 0 43px;border:0}
.r167-prompt{border-radius:999px;min-height:43px;background:var(--r169-field);border:1px solid var(--line);color:var(--muted);font-weight:500;text-align:left;padding-inline:17px;flex:1;min-width:0}
.r167-prompt:hover{background:var(--r169-hover);border-color:var(--red)}
.r167-quick-actions{border-top:1px solid var(--line);padding-top:9px;gap:8px}
.r167-quick-actions>button{background:transparent;border-radius:9px;min-height:35px;justify-content:center;gap:8px;font-weight:700;color:var(--r169-text-secondary)}
.r167-quick-actions>button:hover{background:var(--r169-hover)}
.r167-quick-actions>button:first-child svg{color:#14aa63}
.r167-quick-actions>button:nth-child(2) svg{color:var(--red)}
.r167-quick-actions>button:nth-child(3) svg{color:#eda31a}
.r167-dialog{max-width:620px;border-radius:20px;border:1px solid var(--line);overflow:hidden;box-shadow:0 25px 100px rgba(18,30,56,.24)}
.r167-dialog-header{background:var(--surface);padding:19px 22px}
.r167-dialog-header h2{font-size:19px;font-weight:850}
.r167-close{background:var(--r169-soft);border-radius:50%;height:36px;width:36px}
.r167-form-body{padding:18px 22px}
.r167-form-body textarea[data-composer-body]{min-height:130px;border-radius:14px}
.r167-dialog .composer-bottom{padding:16px 22px}
/* Posts: photographic cards, simple metadata, large tappable actions. */
.feed-heading{display:flex;align-items:center;justify-content:space-between;margin:21px 2px 11px;gap:8px}
.feed-heading h2{font-weight:800;font-size:16px}
.feed-heading>span{color:var(--muted);font-size:12px}
.feed-mode-tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px}
.feed-mode-tabs a{border-radius:999px;padding:8px 14px;font-size:12px;font-weight:700;color:var(--r169-text-secondary);background:var(--surface);border:1px solid var(--line)}
.feed-mode-tabs a.active{background:var(--red);color:white;border-color:var(--red)}
.feed-mode-tabs a:hover{color:var(--red);border-color:var(--red)}
.feed-mode-tabs a.active:hover{color:white}
.post-card{padding:17px 18px 13px;margin-bottom:16px;border-radius:17px;overflow:visible}
.post-top{display:flex;align-items:center;gap:11px;margin-bottom:13px}
.post-top .avatar{width:43px;height:43px}
.post-name{font-size:13px;font-weight:850}
.post-who .meta{font-size:11px;color:var(--muted);margin-top:3px}
.post-options>summary{width:37px;height:37px;border-radius:50%;display:grid;place-items:center}
.post-options>summary:hover{background:var(--r169-hover)}
.post-body{font-size:14px;line-height:1.68;margin-bottom:12px}
.post-photo-grid{border-radius:12px;overflow:hidden;margin-bottom:12px}
.post-photo img{object-fit:cover}
.post-video{border-radius:12px;max-height:600px;background:#0c111b}
.engagement{font-size:12px;padding:3px 0 9px;color:var(--muted)}
.post-actions{border-top:1px solid var(--line);border-bottom:0;padding:7px 0 2px;margin:0;grid-template-columns:repeat(auto-fit,minmax(80px,1fr));gap:3px}
.post-actions .action-button{font-size:12px;min-height:40px;border-radius:9px;gap:6px;font-weight:700;color:var(--r169-text-secondary)}
.post-actions .action-button:hover{background:var(--r169-hover);color:var(--red)}
.post-actions .action-button.is-liked,.post-actions .action-button.is-saved{color:var(--red)}
.v12-comment-section{margin-top:7px}
.v12-comment-input{border-radius:999px;background:var(--r169-field)}
/* Right column follows the preview: distinct welcome hero and tidy recommendation rows. */
.right-welcome{position:relative;min-height:174px;padding:21px;border-radius:17px;overflow:hidden;color:white!important;background:linear-gradient(115deg,#82182a,#e51b39)!important;border:0!important;box-shadow:0 6px 18px rgba(199,20,43,.11)}
.right-welcome:after{content:"";position:absolute;width:185px;height:185px;border:1px solid rgba(255,255,255,.13);border-radius:44px;transform:rotate(35deg);right:-60px;top:-50px;pointer-events:none}
.right-welcome>span{font-size:11px;color:#ffe9eb}
.right-welcome h2{font-size:27px;font-weight:850;margin:6px 0;color:white}
.right-welcome p{font-size:12px;color:#fff;max-width:220px;line-height:1.55}
.right-welcome a{background:#fff;color:#b50d2b;padding:9px 14px;border-radius:999px;font-weight:800;font-size:12px;display:inline-flex;align-items:center;gap:7px}
.right-welcome a:hover{background:#fff1f2;color:#a50c27}
.right-flag{font-size:25px}
.widget{padding:16px;border-radius:17px}
.widget-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:11px}
.widget-title h2{margin:0}
.widget-user,.widget-group{padding:10px 0;display:flex;align-items:center;gap:10px;min-height:54px}
.widget-user+.widget-user,.widget-group+.widget-group{border-top:1px solid var(--line)}
.widget-user .avatar{width:42px;height:42px}
.widget-user strong,.widget-group strong{font-size:12px;font-weight:800}
.widget-user small,.widget-group small{font-size:11px;color:var(--muted)}
.widget-user b:last-child{margin-left:auto;background:var(--red-soft);color:var(--red);width:27px;height:27px;display:grid;place-items:center;border-radius:8px}
.widget-gicon{width:38px;height:38px;border-radius:10px;background:var(--red-soft);color:var(--red);display:grid;place-items:center}
/* Profile header follows the same language as the news feed. */
.profile-card{border-radius:18px;overflow:hidden;margin-bottom:17px}
.profile-cover{min-height:220px;background-color:#c4d8e7;background-image:linear-gradient(125deg,#86b6d5,#e4eef5)}
.profile-inner{padding:0 22px 20px}
.profile-inner>.avatar{box-shadow:0 0 0 5px var(--surface);border:0}
.profile-head h1{font-size:22px;font-weight:850;letter-spacing:-.035em}
.profile-stats{padding-top:12px;border-top:1px solid var(--line);color:var(--r169-text-secondary);gap:18px}
.profile-actions .btn{border-radius:9px;font-size:12px}
/* Groups, events, videos, people, settings and admin inherit one card system. */
.people-grid .card,.group-card,.event-card,.search-strip,.settings-panel,.admin-panel{border-radius:16px}
.section-title h1,.page-title h1{font-weight:850;letter-spacing:-.035em}
.item-list .card{transition:transform .16s,box-shadow .16s}
.item-list .card:hover,.people-grid .card:hover{transform:translateY(-2px);box-shadow:var(--r186-shadow-hover)}
.r15-messenger{border-radius:17px;border:1px solid var(--line);box-shadow:var(--r186-shadow);overflow:hidden}
.r15-conversation:hover{background:var(--r169-hover)}
.r15-chat-compose{border-top:1px solid var(--line)}
.r15-bubble{border-radius:14px}
.r15-popover,.r15-mini-chat{border-radius:16px}
.r15-mini-head{background:linear-gradient(100deg,#e71937,#bd1530)}
.r15-notice.unread{border-left:3px solid var(--red)}
.r16-mobile-nav{background:var(--surface);box-shadow:0 -4px 25px rgba(13,31,54,.08);border-top:1px solid var(--line)}
.r16-mobile-nav a.active{color:var(--red)}
/* Boxed and breakpoints: do not crush the feed. */
@media(max-width:1370px) and (min-width:1121px){
  .app-layout{grid-template-columns:215px minmax(0,1fr)}
  .brand{min-width:190px}
  .content-area{grid-template-columns:minmax(0,1fr) 252px;gap:13px;padding:16px}
  body[data-layout="boxed"] .content-area:not(.content-wide){grid-template-columns:minmax(0,1fr) 234px}
}
@media(max-width:1180px) and (min-width:791px){
  .content-area:not(.content-wide),body[data-layout="boxed"] .content-area:not(.content-wide){grid-template-columns:minmax(0,1fr)}
  .right-sidebar{display:none}
}
@media(max-width:1120px) and (min-width:791px){
  .app-layout,body[data-layout="boxed"] .app-layout{grid-template-columns:190px minmax(0,1fr)}
  .top-inner{gap:12px}
  .brand{min-width:180px;font-size:24px}
  .sidebar{padding-inline:9px}
}
@media(max-width:790px){
  .topbar{height:64px}
  .top-inner{padding:0 12px;gap:8px}
  .brand{min-width:0;font-size:21px}
  .brand-mark{width:35px;height:35px}
  .top-search{max-width:none;min-width:55px}
  .top-links{gap:1px}
  .top-links>a:not(.top-self){height:45px;min-width:39px;min-height:44px;border-radius:12px;padding:7px}
  .top-links small{display:none}
  .top-links>a.active:after{bottom:-2px}
  .sidebar{top:64px;height:calc(100dvh - 64px);box-shadow:12px 5px 30px rgba(16,24,40,.13)}
  .content-area{padding:13px 12px calc(92px + env(safe-area-inset-bottom));max-width:870px}
  .post-card{padding:13px 12px}
  .stories-box{padding:13px 10px}
  .stories-row .r163-group-wrap,.stories-row .story-add{flex-basis:97px;width:97px}
  .stories-row .r163-story-card,.stories-row .story-add{height:151px;min-height:151px}
  .r167-composer{padding:12px}
  .profile-cover{min-height:150px}
}
@media(max-width:460px){
  .brand{font-size:19px;letter-spacing:-.8px}
  .top-inner{padding:0 8px;gap:6px}
  .top-search{padding:8px;min-height:38px}
  .top-links>a:not(.top-self){min-width:37px;padding:5px}
  .top-links .top-self .avatar{width:32px;height:32px}
  .feed-mode-tabs{gap:5px}
  .feed-mode-tabs a{padding:7px 10px;font-size:11px}
  .post-actions .action-button{font-size:11px;gap:4px}
  .r167-quick-actions>button{font-size:11px;gap:5px}
  .profile-head h1{font-size:20px}
  .profile-inner{padding-inline:12px}
  .widget-title h2{font-size:14px}
}
@media(max-width:370px){.brand>span:last-child{display:none}.brand{flex:0 0 35px;min-width:35px}.top-search{flex:0 1 45px}.top-search:focus-within{flex:1 1 120px}}
@media(prefers-reduced-motion:reduce){.story-tile img,.item-list .card,.people-grid .card{transition:none!important}}
/* Match boxed mobile to full mobile: desktop brand widths must not leak below 790px. */
@media(max-width:790px){body[data-layout="boxed"] .brand{min-width:0}}
@media(max-width:370px){body[data-layout="boxed"] .brand{min-width:35px;flex:0 0 35px}}
/* Reference-style mobile create action and More toggle (both are functional). */
.r16-mobile-nav button{appearance:none;border:0;background:transparent;color:var(--muted);font:inherit;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:48px;min-width:44px;cursor:pointer}
.r16-mobile-nav button>span{font-size:10px}
.r16-mobile-nav .r186-mobile-create svg{width:34px;height:34px;padding:7px;border-radius:50%;background:var(--red);color:#fff;box-shadow:0 5px 12px rgba(238,24,51,.18)}
.r16-mobile-nav .r186-mobile-create{color:var(--red);font-weight:800}
.r16-mobile-nav .r186-mobile-more:hover{color:var(--red)}
